mirror of
https://github.com/processing/processing4.git
synced 2026-02-26 08:44:39 +01:00
fighting with Android quirks in the latest Google SDK
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user