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

Class PShape

core/src/processing/core/PShape.java:97–3603  ·  view source on GitHub ↗

Datatype for storing shapes. Before a shape is used, it must be loaded with the loadShape() or created with the createShape() . The shape() function is used to draw the shape to the display window. Processing can currently load and display SVG (Scalable Vector Graphics) and OBJ s

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected