work on alpha() in PImage, also cleaned up proper bounding of color

commands
This commit is contained in:
benfry
2004-09-03 16:41:20 +00:00
parent 218dc2877f
commit 8790dad941
4 changed files with 55 additions and 18 deletions

View File

@@ -285,7 +285,8 @@ public class PImage implements PConstants, Cloneable {
public int get(int x, int y) {
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) return 0;
return (format == RGB) ?
(pixels[y*width + x] & 0xff000000) : pixels[y*width + x];
(pixels[y*width + x] & 0x00ffffff) : pixels[y*width + x];
//(pixels[y*width + x] & 0xff000000) : pixels[y*width + x];
}