a port of the Processing Visualization Language
Name

shapeMode()

Examples
example pic
PShape bot = loadShape("bot1.svg");
smooth();
shapeMode(CENTER);
shape(bot, 35, 35, 50, 50);
shapeMode(CORNER);
fill(102);
shape(bot, 35, 35, 50, 50);
Description

Modifies the location from which shapes draw. The default mode is shapeMode(CORNER), which 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. The syntax shapeMode(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. The syntax shapeMode(CENTER) draws the shape from its center point and uses the third and forth parameters of shape() to specify the width and height. The parameter must be written in "ALL CAPS" because Processing is a case sensitive language.

Syntax
shapeMode(MODE)

Parameters
MODE Either CORNER, CORNERS, CENTER
Returns None
Usage Web & Application
Related PShape
loadShape()
shapeMode()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub