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

Method begin2D

core/src/processing/opengl/PGraphics3D.java:83–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82
83 @Override
84 protected void begin2D() {
85 pushProjection();
86 ortho(-width/2f, width/2f, -height/2f, height/2f);
87 pushMatrix();
88
89 // Set camera for 2D rendering, it simply centers at (width/2, height/2)
90 float centerX = width/2f;
91 float centerY = height/2f;
92 modelview.reset();
93 modelview.translate(-centerX, -centerY);
94
95 modelviewInv.set(modelview);
96 modelviewInv.invert();
97
98 camera.set(modelview);
99 cameraInv.set(modelviewInv);
100
101 updateProjmodelview();
102 }
103
104
105 @Override

Callers

nothing calls this directly

Calls 8

pushProjectionMethod · 0.80
updateProjmodelviewMethod · 0.80
resetMethod · 0.65
translateMethod · 0.65
setMethod · 0.65
invertMethod · 0.65
orthoMethod · 0.45
pushMatrixMethod · 0.45

Tested by

no test coverage detected