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