Create an Image to be used as an offscreen drawing context, automatically doubling the size if running on a retina display.
(Component comp, int width, int height)
| 727 | * automatically doubling the size if running on a retina display. |
| 728 | */ |
| 729 | static public Image offscreenGraphics(Component comp, int width, int height) { |
| 730 | int m = Toolkit.isRetina() ? 2 : 1; |
| 731 | //return comp.createImage(m * dpi(width), m * dpi(height)); |
| 732 | return comp.createImage(m * width, m * height); |
| 733 | } |
| 734 | |
| 735 | |
| 736 | /** |
no test coverage detected