| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,6 +39,7 @@ | |||
| 39 | 39 | import java.awt.color.ColorSpace; | |
| 40 | 40 | import java.awt.image.BufferedImage; | |
| 41 | 41 | ||
| 42 | + | ||
| 42 | 43 | // used by loadImage() functions | |
| 43 | 44 | import javax.imageio.ImageIO; | |
| 44 | 45 | import javax.swing.ImageIcon; | |
@@ -1041,6 +1042,9 @@ static public int displayDensity(int display) { | |||
| 1041 | 1042 | public void pixelDensity(int density) { | |
| 1042 | 1043 | if (density != this.pixelDensity) { | |
| 1043 | 1044 | if (insideSettings("pixelDensity", density)) { | |
| 1045 | + if (density != 1 && density != 2) { | ||
| 1046 | + throw new RuntimeException("pixelDensity() can only be 1 or 2"); | ||
| 1047 | + } | ||
| 1044 | 1048 | this.pixelDensity = density; | |
| 1045 | 1049 | } | |
| 1046 | 1050 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments