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

Method setSize

core/src/processing/core/PSurfaceNone.java:124–145  ·  view source on GitHub ↗
(int wide, int high)

Source from the content-addressed store, hash-verified

122
123
124 @Override
125 public void setSize(int wide, int high) {
126 if (PApplet.DEBUG) {
127 //System.out.format("frame visible %b, setSize(%d, %d) %n", frame.isVisible(), wide, high);
128 new Exception(String.format("setSize(%d, %d)", wide, high)).printStackTrace(System.out);
129 }
130
131 //if (wide == sketchWidth && high == sketchHeight) { // doesn't work on launch
132 if (wide == sketch.width && high == sketch.height) {
133 if (PApplet.DEBUG) {
134 new Exception("w/h unchanged " + wide + " " + high).printStackTrace(System.out);
135 }
136 return; // unchanged, don't rebuild everything
137 }
138
139 //throw new RuntimeException("implement me, see readme.md");
140 sketch.width = wide;
141 sketch.height = high;
142
143 // set PGraphics variables for width/height/pixelWidth/pixelHeight
144 graphics.setSize(wide, high);
145 }
146
147
148// public void initImage(PGraphics graphics) {

Callers 1

initOffscreenMethod · 0.95

Calls 3

formatMethod · 0.65
setSizeMethod · 0.65
printStackTraceMethod · 0.45

Tested by

no test coverage detected