pixelDensity (all): fix background(PImage) size check

This commit is contained in:
Jakub Valtar
2017-04-17 21:31:59 +02:00
parent 0f0731d1e2
commit 18e43a9ae0
+1 -1
View File
@@ -7352,7 +7352,7 @@ public class PGraphics extends PImage implements PConstants {
* @param image PImage to set as background (must be same size as the sketch window)
*/
public void background(PImage image) {
if ((image.pixelWidth != width) || (image.pixelHeight != height)) {
if ((image.pixelWidth != pixelWidth) || (image.pixelHeight != pixelHeight)) {
throw new RuntimeException(ERROR_BACKGROUND_IMAGE_SIZE);
}
if ((image.format != RGB) && (image.format != ARGB)) {