mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
PImage.copy problem (bug #1174)
This commit is contained in:
@@ -1486,8 +1486,8 @@ public class PImage implements PConstants, Cloneable {
|
||||
int mode) {
|
||||
if (srcX1 < 0) srcX1 = 0;
|
||||
if (srcY1 < 0) srcY1 = 0;
|
||||
if (srcX2 >= img.width) srcX2 = img.width - 1;
|
||||
if (srcY2 >= img.height) srcY2 = img.height - 1;
|
||||
if (srcX2 > img.width) srcX2 = img.width;
|
||||
if (srcY2 > img.height) srcY2 = img.height;
|
||||
|
||||
int srcW = srcX2 - srcX1;
|
||||
int srcH = srcY2 - srcY1;
|
||||
|
||||
Reference in New Issue
Block a user