mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
another bug fix for set() and resize()
This commit is contained in:
@@ -1826,13 +1826,12 @@ public class PGraphicsAndroid2D extends PGraphics {
|
||||
src.bitmap.setPixels(src.pixels, 0, src.width, 0, 0, src.width, src.height);
|
||||
src.modified = false;
|
||||
}
|
||||
// set() happens in screen coordinates, so need to clear the ctm
|
||||
canvas.save(Canvas.MATRIX_SAVE_FLAG);
|
||||
canvas.setMatrix(null); // set to identity
|
||||
canvas.drawBitmap(src.bitmap, x, y, null);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
// set() happens in screen coordinates, so need to clear the ctm
|
||||
canvas.save(Canvas.MATRIX_SAVE_FLAG);
|
||||
canvas.setMatrix(null); // set to identity
|
||||
canvas.drawBitmap(src.bitmap, x, y, null);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -364,6 +364,7 @@ public class PImage implements PConstants, Cloneable {
|
||||
width = 0; // Gimme a break, don't waste my time
|
||||
height = 0;
|
||||
pixels = new int[0];
|
||||
bitmap = null;
|
||||
|
||||
} else {
|
||||
if (wide == 0) { // Use height to determine relative size
|
||||
|
||||
Reference in New Issue
Block a user