Name

shape

Examples
setup <- function() {
    s = loadShape(paste("https://raw.githubusercontent.com", "/gaocegege/Processing.R/master/raw-docs", 
        "/img/examples/bot1.svg", sep = ""))
}

draw <- function() {
    shape(s, 10, 10, 80, 80)
}
Description Draws shapes to the display window. Shapes must be in the sketch's "data" directory to load correctly. Select "Add file..." from the "Sketch" menu to add the shape. Processing currently works with SVG, OBJ, and custom-created shapes. The shape parameter specifies the shape to display and the coordinate parameters define the location of the shape from its upper-left corner. The shape is displayed at its original size unless the c and d parameters specify a different size. The shapeMode() function can be used to change the way these parameters are interpreted.
Syntax
shape(shape)
shape(shape, x, y)
shape(shape, a, b, c, d)
Parameters
shapePShape: the shape to display
xfloat: x-coordinate of the shape
yfloat: y-coordinate of the shape
afloat: x-coordinate of the shape
bfloat: y-coordinate of the shape
cfloat: width to display the shape
dfloat: height to display the shape
Related PShape
loadShape
shapeMode
Creative Commons License