fighting with Android quirks in the latest Google SDK

This commit is contained in:
benfry
2012-03-23 00:39:33 +00:00
parent 9ca741bedd
commit b4b153b7dc
7 changed files with 223 additions and 83 deletions

View File

@@ -524,10 +524,17 @@ public class PImage implements PConstants, Cloneable {
h += y; // clip off some of the height
y = 0;
}
if (x + w > width) w = width - x;
if (y + h > height) h = height - y;
if (w < 0) {
w = 0;
}
if (h < 0) {
h = 0;
}
return getImpl(x, y, w, h);
}