(PShape shape)
| 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 | /** |
nothing calls this directly
no test coverage detected