a port of the Processing Visualization Language
Name

imageMode()

Examples
example pic
// @pjs preload must be used to preload the image
    /* @pjs preload="laDefense_crop.jpg"; */
    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

Syntax
imageMode(MODE)
Parameters
MODE Either CORNER, CORNERS, or CENTER
Returns None
Usage Web & Application
Related loadImage()
PImage
image()
background()

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

Creative Commons License
Fork me on GitHub