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

Class PShape

core/src/processing/core/PShape.java:84–3537  ·  view source on GitHub ↗

( begin auto-generated from PShape.xml ) Datatype for storing shapes. Processing can currently load and display SVG (Scalable Vector Graphics) shapes. Before a shape is used, it must be loaded with the loadShape() function. The shape() function is used to draw the shape to the display

Source from the content-addressed store, hash-verified

82 * @instanceName sh any variable of type PShape
83 */
84public class PShape implements PConstants {
85 protected String name;
86 protected Map<String,PShape> nameTable;
87
88// /** Generic, only draws its child objects. */
89// static public final int GROUP = 0;
90 // GROUP now inherited from PConstants, and is still zero
91
92 // These constants were updated in 3.0b6 so that they could be distinguished
93 // from others in PConstants and improve how some typos were handled.
94 // https://github.com/processing/processing/issues/3776
95 /** A line, ellipse, arc, image, etc. */
96 static public final int PRIMITIVE = 101;
97 /** A series of vertex, curveVertex, and bezierVertex calls. */
98 static public final int PATH = 102;
99 /** Collections of vertices created with beginShape(). */
100 static public final int GEOMETRY = 103;
101 /** The shape type, one of GROUP, PRIMITIVE, PATH, or GEOMETRY. */
102 protected int family;
103
104 /** ELLIPSE, LINE, QUAD; TRIANGLE_FAN, QUAD_STRIP; etc. */
105 protected int kind;
106
107 protected PMatrix matrix;
108
109 protected int textureMode;
110
111 /** Texture or image data associated with this shape. */
112 protected PImage image;
113 protected String imagePath = null;
114
115 public static final String OUTSIDE_BEGIN_END_ERROR =
116 "%1$s can only be called between beginShape() and endShape()";
117
118 public static final String INSIDE_BEGIN_END_ERROR =
119 "%1$s can only be called outside beginShape() and endShape()";
120
121 public static final String NO_SUCH_VERTEX_ERROR =
122 "%1$s vertex index does not exist";
123
124 static public final String NO_VERTICES_ERROR =
125 "getVertexCount() only works with PATH or GEOMETRY shapes";
126
127 public static final String NOT_A_SIMPLE_VERTEX =
128 "%1$s can not be called on quadratic or bezier vertices";
129
130 static public final String PER_VERTEX_UNSUPPORTED =
131 "This renderer does not support %1$s for individual vertices";
132
133 /**
134 * ( begin auto-generated from PShape_width.xml )
135 *
136 * The width of the PShape document.
137 *
138 * ( end auto-generated )
139 * @webref pshape:field
140 * @usage web_application
141 * @brief Shape document width

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected