mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
Remove alpha filler
No longer needed because primary surface is now ARGB
4cc46d8c9f
This commit is contained in:
@@ -1027,14 +1027,11 @@ public class PGraphicsJava2D extends PGraphics {
|
||||
int[] srcPixels = new int[width];
|
||||
int[] dstPixels = new int[width];
|
||||
|
||||
// Java won't set the high bits when RGB, returns 0 for alpha
|
||||
int alphaFiller = (dstIn.getNumBands() == 3) ? (0xFF << 24) : 0x00;
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
src.getDataElements(0, y, width, 1, srcPixels);
|
||||
dstIn.getDataElements(0, y, width, 1, dstPixels);
|
||||
for (int x = 0; x < width; x++) {
|
||||
dstPixels[x] = blendColor(alphaFiller | dstPixels[x], srcPixels[x], mode);
|
||||
dstPixels[x] = blendColor(dstPixels[x], srcPixels[x], mode);
|
||||
}
|
||||
dstOut.setDataElements(0, y, width, 1, dstPixels);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user