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

Method setFrameSize

core/src/processing/awt/PSurfaceAWT.java:815–828  ·  view source on GitHub ↗

Resize frame for these sketch (canvas) dimensions.

()

Source from the content-addressed store, hash-verified

813
814 /** Resize frame for these sketch (canvas) dimensions. */
815 private Dimension setFrameSize() { //int sketchWidth, int sketchHeight) {
816 // https://github.com/processing/processing/pull/3162
817 frame.addNotify(); // using instead of show() to add the peer [fry]
818
819// System.out.format("setting frame size %d %d %n", sketchWidth, sketchHeight);
820// new Exception().printStackTrace(System.out);
821 currentInsets = frame.getInsets();
822 int windowW = Math.max(sketchWidth, MIN_WINDOW_WIDTH) +
823 currentInsets.left + currentInsets.right;
824 int windowH = Math.max(sketchHeight, MIN_WINDOW_HEIGHT) +
825 currentInsets.top + currentInsets.bottom;
826 frame.setSize(windowW, windowH);
827 return new Dimension(windowW, windowH);
828 }
829
830
831 private void setFrameCentered() {

Callers 2

placeWindowMethod · 0.95
setSizeMethod · 0.95

Calls 2

setSizeMethod · 0.65
maxMethod · 0.45

Tested by

no test coverage detected