(PShape shape)
| 3983 | |
| 3984 | |
| 3985 | public void shape(PShape shape) { |
| 3986 | if (shape.isVisible()) { // don't do expensive matrix ops if invisible |
| 3987 | // Flushing any remaining geometry generated in the immediate mode |
| 3988 | // to avoid depth-sorting issues. |
| 3989 | flush(); |
| 3990 | |
| 3991 | if (shapeMode == CENTER) { |
| 3992 | pushMatrix(); |
| 3993 | translate(-shape.getWidth()/2, -shape.getHeight()/2); |
| 3994 | } |
| 3995 | |
| 3996 | shape.draw(this); // needs to handle recorder too |
| 3997 | |
| 3998 | if (shapeMode == CENTER) { |
| 3999 | popMatrix(); |
| 4000 | } |
| 4001 | } |
| 4002 | } |
| 4003 | |
| 4004 | |
| 4005 | /** |
nothing calls this directly
no test coverage detected