From 18e43a9ae0bbec6d6db09048fe767ced5d8aa5a0 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Mon, 17 Apr 2017 21:31:59 +0200 Subject: [PATCH] pixelDensity (all): fix background(PImage) size check --- core/src/processing/core/PGraphics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 9c8195d7c..a4425e1d8 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -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)) {