MCPcopy Create free account
hub / github.com/benfry/processing4 / imageMode

Method imageMode

core/src/processing/core/PGraphics.java:3862–3870  ·  view source on GitHub ↗

Modifies the location from which images are drawn by changing the way in which parameters given to image() are interpreted. The default mode is imageMode(CORNER) , which interprets the second and third parameters of image() as the upper-left corner of the image. If t

(int mode)

Source from the content-addressed store, hash-verified

3860 * @see PGraphics#background(float, float, float, float)
3861 */
3862 public void imageMode(int mode) {
3863 if ((mode == CORNER) || (mode == CORNERS) || (mode == CENTER)) {
3864 imageMode = mode;
3865 } else {
3866 String msg =
3867 "imageMode() only works with CORNER, CORNERS, or CENTER";
3868 throw new RuntimeException(msg);
3869 }
3870 }
3871
3872
3873 /**

Callers 1

styleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected