FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

deal with wise guys · ForkBackups/processing@b75415d · GitHub

Repository navigation

Commit b75415d

Browse files
committed
deal with wise guys
1 parent 417abd5 commit b75415d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎core/src/processing/core/PApplet.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import java.awt.color.ColorSpace;
4040
import java.awt.image.BufferedImage;
4141

42+
4243
// used by loadImage() functions
4344
import javax.imageio.ImageIO;
4445
import javax.swing.ImageIcon;
@@ -1041,6 +1042,9 @@ static public int displayDensity(int display) {
10411042
public void pixelDensity(int density) {
10421043
if (density != this.pixelDensity) {
10431044
if (insideSettings("pixelDensity", density)) {
1045+
if (density != 1 && density != 2) {
1046+
throw new RuntimeException("pixelDensity() can only be 1 or 2");
1047+
}
10441048
this.pixelDensity = density;
10451049
}
10461050
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL