load-shape

shape

shape-mode

load-shape

Arguments
[filename]
Docstring
Load a geometry from a file as a PShape.
Works only inside sketch functions?
Yes
Original Processing method
loadShape()

shape

Arguments
[sh x y width height][sh x y][sh]
Docstring
Displays shapes to the screen. The shapes must have been loaded
with load-shape. Processing currently works with SVG shapes
only. The sh parameter specifies the shape to display and the x and
y parameters define the location of the shape from its upper-left
corner. The shape is displayed at its original size unless the width
and height parameters specify a different size. The shape-mode
fn changes the way the parameters work. A call to
(shape-mode :corners), for example, will change the width and height
parameters to define the x and y values of the opposite corner of
the shape.

Note complex shapes may draw awkwardly with the renderers :p2d, :p3d, and
:opengl. Those renderers do not yet support shapes that have holes
or complicated breaks.
Works only inside sketch functions?
Yes
Original Processing method
shape()

shape-mode

Arguments
[mode]
Docstring
Modifies the location from which shapes draw. Available modes are
:corner, :corners and :center. Default is :corner.

:corner  - specifies the location to be the upper left corner of the
           shape and uses the third and fourth parameters of shape
           to specify the width and height.

:corners - uses the first and second parameters of shape to set
           the location of one corner and uses the third and fourth
           parameters to set the opposite corner.

:center  - draws the shape from its center point and uses the third
           and forth parameters of shape to specify the width and
           height. 
Works only inside sketch functions?
Yes
Original Processing method
shapeMode()