MCPcopy Index your code
hub / github.com/processing/processing / imageMode

Method imageMode

core/src/processing/core/PGraphics.java:3763–3771  ·  view source on GitHub ↗

( begin auto-generated from imageMode.xml ) 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

(int mode)

Source from the content-addressed store, hash-verified

3761 * @see PGraphics#background(float, float, float, float)
3762 */
3763 public void imageMode(int mode) {
3764 if ((mode == CORNER) || (mode == CORNERS) || (mode == CENTER)) {
3765 imageMode = mode;
3766 } else {
3767 String msg =
3768 "imageMode() only works with CORNER, CORNERS, or CENTER";
3769 throw new RuntimeException(msg);
3770 }
3771 }
3772
3773
3774 /**

Callers 1

styleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected