Reference for Processing version 1.2. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.
Name | imageMode() |
||
---|---|---|---|
Examples | PImage b; b = loadImage("laDefense_crop.jpg"); imageMode(CORNERS); image(b, 10, 10, 60, 60); imageMode(CORNER); image(b, 35, 35, 50, 50); |
||
Description | Modifies the location from which images draw. The default mode is imageMode(CORNER), which specifies the location to be the upper left corner and uses the fourth and fifth parameters of image() to set the image's width and height. The syntax imageMode(CORNERS) uses the second and third parameters of image() to set the location of one corner of the image and uses the fourth and fifth parameters to set the opposite corner. Use imageMode(CENTER) to draw images centered at the given x and y position.
The parameter to imageMode() must be written in ALL CAPS because Processing is a case sensitive language. |
||
Syntax | imageMode(MODE) |
||
Parameters |
|
||
Returns | None | ||
Usage | Web & Application | ||
Related | loadImage() PImage image() imageMode() background() |