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

Method shape

core/src/processing/core/PGraphics.java:4077–4094  ·  view source on GitHub ↗
(PShape shape)

Source from the content-addressed store, hash-verified

4075
4076
4077 public void shape(PShape shape) {
4078 if (shape.isVisible()) { // don't do expensive matrix ops if invisible
4079 // Flushing any remaining geometry generated in the immediate mode
4080 // to avoid depth-sorting issues.
4081 flush();
4082
4083 if (shapeMode == CENTER) {
4084 pushMatrix();
4085 translate(-shape.getWidth()/2, -shape.getHeight()/2);
4086 }
4087
4088 shape.draw(this); // needs to handle recorder too
4089
4090 if (shapeMode == CENTER) {
4091 popMatrix();
4092 }
4093 }
4094 }
4095
4096
4097 /**

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected