mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fixes for alpha issues
This commit is contained in:
@@ -1447,8 +1447,16 @@ public class PGraphicsJava2D extends PGraphics {
|
||||
// op.filter(image, image);
|
||||
}
|
||||
} else { // !tint
|
||||
if (targetType == RGB && (source.pixels[0] >> 24 == 0)) {
|
||||
// If it's an RGB image and the high bits aren't set, need to set
|
||||
// the high bits to opaque because we're drawing ARGB images.
|
||||
source.filter(OPAQUE);
|
||||
// Opting to just manipulate the image here, since it shouldn't
|
||||
// affect anything else (and alpha(get(x, y)) should return 0xff).
|
||||
// Wel also make no guarantees about the values of the pixels array
|
||||
// in a PImage and how the high bits will be set.
|
||||
}
|
||||
// If no tint, just shove the pixels on in there verbatim
|
||||
// System.out.println("!tint source.pixels[0] alpha is " + (source.pixels[0] >>> 24));
|
||||
wr.setDataElements(0, 0, source.width, source.height, source.pixels);
|
||||
}
|
||||
this.tinted = tint;
|
||||
|
||||
+6
-2
@@ -1,4 +1,10 @@
|
||||
0224 core
|
||||
X PImage resize() causes PImage not to be rendered in JAVA2D
|
||||
X https://github.com/processing/processing/issues/2179
|
||||
|
||||
fixed in 2.1
|
||||
X draw() called again before finishing on OS X (retina issue)
|
||||
X https://github.com/processing/processing/issues/1709
|
||||
|
||||
|
||||
high
|
||||
@@ -16,8 +22,6 @@ _ display=all in cmd line
|
||||
_ sketchDisplay() -> 0 for all, or 1, 2, 3...
|
||||
_ test PGraphicsRetina2D w/ 7u40
|
||||
_ make sure that 7u40 doesn't reintroduce starvation issue on retina Macs
|
||||
_ draw() called again before finishing on OS X (retina issue)
|
||||
_ https://github.com/processing/processing/issues/1709
|
||||
_ Linux sometimes not responding correctly w/ the size() command
|
||||
_ https://github.com/processing/processing/issues/1672
|
||||
_ clean up requestFocus() stuff
|
||||
|
||||
Reference in New Issue
Block a user