fix for mask() and updatePixels (bug #744)

This commit is contained in:
benfry
2008-03-14 02:11:58 +00:00
parent 2ed290a1b6
commit e86262f30c
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -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();
}
+2
View File
@@ -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)