Calculate the desired size in pixels of an element using preferences or system zoom if preferences set to auto. @param pixels The size in pixels to scale. @return The scaled size.
(int pixels)
| 1059 | * @return The scaled size. |
| 1060 | */ |
| 1061 | static public int zoom(int pixels) { |
| 1062 | if (zoom == 0) { |
| 1063 | zoom = parseZoom(); |
| 1064 | } |
| 1065 | // Deal with 125% scaling badness |
| 1066 | // https://github.com/processing/processing/issues/4902 |
| 1067 | return (int) Math.ceil(zoom * pixels); |
| 1068 | } |
| 1069 | |
| 1070 | |
| 1071 | static public Dimension zoom(int w, int h) { |
no test coverage detected