( 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)
| 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 | /** |