MCPcopy Index your code
hub / github.com/benfry/processing4 / shape

Method shape

core/src/processing/opengl/PGraphicsOpenGL.java:3311–3329  ·  view source on GitHub ↗
(PShape shape, float x, float y, float z)

Source from the content-addressed store, hash-verified

3309
3310 // TODO unapproved
3311 @Override
3312 protected void shape(PShape shape, float x, float y, float z) {
3313 if (shape.isVisible()) { // don't do expensive matrix ops if invisible
3314 flush();
3315
3316 pushMatrix();
3317
3318 if (shapeMode == CENTER) {
3319 translate(x - shape.getWidth() / 2, y - shape.getHeight() / 2,
3320 z - shape.getDepth() / 2);
3321
3322 } else if ((shapeMode == CORNER) || (shapeMode == CORNERS)) {
3323 translate(x, y, z);
3324 }
3325 shape.draw(this);
3326
3327 popMatrix();
3328 }
3329 }
3330
3331
3332 // TODO unapproved

Callers

nothing calls this directly

Calls 10

flushMethod · 0.95
pushMatrixMethod · 0.95
translateMethod · 0.95
popMatrixMethod · 0.95
scaleMethod · 0.95
isVisibleMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45
getDepthMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected