mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix for mask() and updatePixels (bug #744)
This commit is contained in:
@@ -379,6 +379,7 @@ public class PImage implements PConstants, Cloneable {
|
||||
public void set(int x, int y, int c) {
|
||||
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) return;
|
||||
pixels[y*width + x] = c;
|
||||
updatePixels(x, y, x+1, y+1); // slow?
|
||||
}
|
||||
|
||||
|
||||
@@ -426,6 +427,11 @@ public class PImage implements PConstants, Cloneable {
|
||||
srcOffset += src.width;
|
||||
dstOffset += width;
|
||||
}
|
||||
if (imageMode == CORNER) {
|
||||
updatePixels(sx, sy, sw, sh);
|
||||
} else {
|
||||
updatePixels(sx, sy, sx+sw, sy+sh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -458,6 +464,7 @@ public class PImage implements PConstants, Cloneable {
|
||||
pixels[i] = ((alpha[i] & 0xff) << 24) | (pixels[i] & 0xffffff);
|
||||
}
|
||||
format = ARGB;
|
||||
updatePixels();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ X fix bug with splice() and arrays
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=734
|
||||
X 'screen' is now static
|
||||
_ undo this--may need to be better about specifying screen and all
|
||||
X PImage mask doesn't work after first call
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=744
|
||||
|
||||
_ change openStream() to createInput()
|
||||
_ add createOutput() (and raw versions of the same, err.. no raw)
|
||||
|
||||
Reference in New Issue
Block a user