Defines the dimension of the display window width and height in units of pixels. In a program that has the setup() function, the size() function must be the first line of code inside setup() , and the setup() function must appear in the code tab with the same name as your
(int width, int height)
| 1708 | * @see PApplet#fullScreen() |
| 1709 | */ |
| 1710 | public void size(int width, int height) { |
| 1711 | // Check to make sure the width/height have actually changed. It's ok to |
| 1712 | // have size() duplicated (and may be better to not remove it from where |
| 1713 | // it sits in the code anyway when adding it to settings()). Only take |
| 1714 | // action if things have changed. |
| 1715 | if (width != this.width || |
| 1716 | height != this.height) { |
| 1717 | if (insideSettings("size", width, height)) { |
| 1718 | this.width = width; |
| 1719 | this.height = height; |
| 1720 | } |
| 1721 | } |
| 1722 | } |
| 1723 | |
| 1724 | |
| 1725 | public void size(int width, int height, String renderer) { |
no test coverage detected