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

Method setSize

core/src/processing/javafx/PSurfaceFX.java:619–637  ·  view source on GitHub ↗
(int wide, int high)

Source from the content-addressed store, hash-verified

617
618
619 public void setSize(int wide, int high) {
620 // When the surface is set to resizable via surface.setResizable(true),
621 // a crash may occur if the user sets the window to size zero.
622 // https://github.com/processing/processing/issues/5052
623 if (high <= 0) {
624 high = 1;
625 }
626 if (wide <= 0) {
627 wide = 1;
628 }
629
630 //System.out.format("%s.setSize(%d, %d)%n", getClass().getSimpleName(), width, height);
631 Scene scene = stage.getScene();
632 double decorH = stage.getWidth() - scene.getWidth();
633 double decorV = stage.getHeight() - scene.getHeight();
634 stage.setWidth(wide + decorH);
635 stage.setHeight(high + decorV);
636 fx.setSize(wide, high);
637 }
638
639
640// public Component getComponent() {

Callers

nothing calls this directly

Calls 4

setSizeMethod · 0.65
getWidthMethod · 0.45
getHeightMethod · 0.45
setWidthMethod · 0.45

Tested by

no test coverage detected