/** * Copy things from one area of this image * to another area in the same image. */ public void copy(int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) { blend(this, sx, sy, sw, sh, dx, dy, dw, dh, REPLACE); }
/** * Copies area of one image into another PImage object. */ public void copy(PImage src, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) { blend(src, sx, sy, sw, sh, dx, dy, dw, dh, REPLACE); }
/** * @param src an image variable referring to the source image. */ public void copy(PImage src, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) { blend(src, sx, sy, sw, sh, dx, dy, dw, dh, REPLACE); }
public void blend(int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int mode) { blend(this, sx, sy, sw, sh, dx, dy, dw, dh, mode); }
blend(this, sx, sy, sw, sh, dx, dy, dw, dh, REPLACE);
/** * Copies area of one image into another PImage object. * @see processing.core.PImage#blendColor(int,int,int) */ public void blend(PImage src, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int mode) { /* if (imageMode == CORNER) { // if CORNERS, do nothing sx2 += sx1; sy2 += sy1; dx2 += dx1; dy2 += dy1; } else if (imageMode == CENTER) { sx1 -= sx2 / 2f; sy1 -= sy2 / 2f; sx2 += sx1; sy2 += sy1; dx1 -= dx2 / 2f; dy1 -= dy2 / 2f; dx2 += dx1; dy2 += dy1; } */ int sx2 = sx + sw; int sy2 = sy + sh; int dx2 = dx + dw; int dy2 = dy + dh;