MCPcopy Index your code
hub / github.com/processing/processing / offscreenGraphics

Method offscreenGraphics

app/src/processing/app/ui/Toolkit.java:729–733  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 /**

Callers 5

paintComponentMethod · 0.95
paintComponentMethod · 0.95
paintComponentMethod · 0.95
paintMethod · 0.95
paintComponentMethod · 0.95

Calls 2

isRetinaMethod · 0.95
createImageMethod · 0.80

Tested by

no test coverage detected