Changes the location from which images are drawn when image() is called.
By default, the first two parameters of image() are the x- and y-coordinates of the image's upper-left corner. The next parameters are its width and height. This is the same as calling imageMode(CORNER).
imageMode(CORNERS) also uses the first two parameters of image() as the x- and y-coordinates of the image's top-left corner. The third and fourth parameters are the coordinates of its bottom-right corner.
imageMode(CENTER) uses the first two parameters of image() as the x- and y-coordinates of the image's center. The next parameters are its width and height.
Examples
Syntax
imageMode(mode)
Parameters
mode
Constant:
either CORNER, CORNERS, or CENTER.
This page is generated from the comments in src/image/loading_displaying.js . Please feel free to edit it and submit a pull request!