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

Method setCanvasSize

core/src/processing/awt/PSurfaceAWT.java:802–811  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

800
801
802 private void setCanvasSize() {
803// System.out.format("setting canvas size %d %d%n", sketchWidth, sketchHeight);
804// new Exception().printStackTrace(System.out);
805 int contentW = Math.max(sketchWidth, MIN_WINDOW_WIDTH);
806 int contentH = Math.max(sketchHeight, MIN_WINDOW_HEIGHT);
807
808 canvas.setBounds((contentW - sketchWidth)/2,
809 (contentH - sketchHeight)/2,
810 sketchWidth, sketchHeight);
811 }
812
813
814 /** Resize frame for these sketch (canvas) dimensions. */

Callers 1

setSizeMethod · 0.95

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected