mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
pixelDensity (all): fix background(PImage) size check
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user