(int x, int y, int w, int h)
| 758 | |
| 759 | |
| 760 | protected void updateTexelsImpl(int x, int y, int w, int h) { |
| 761 | int x2 = x + w; |
| 762 | int y2 = y + h; |
| 763 | |
| 764 | if (!modified) { |
| 765 | mx1 = PApplet.max(0, x); |
| 766 | mx2 = PApplet.min(width - 1, x2); |
| 767 | my1 = PApplet.max(0, y); |
| 768 | my2 = PApplet.min(height - 1, y2); |
| 769 | modified = true; |
| 770 | |
| 771 | } else { |
| 772 | if (x < mx1) mx1 = PApplet.max(0, x); |
| 773 | if (x > mx2) mx2 = PApplet.min(width - 1, x); |
| 774 | if (y < my1) my1 = PApplet.max(0, y); |
| 775 | if (y > my2) my2 = y; |
| 776 | |
| 777 | if (x2 < mx1) mx1 = PApplet.max(0, x2); |
| 778 | if (x2 > mx2) mx2 = PApplet.min(width - 1, x2); |
| 779 | if (y2 < my1) my1 = PApplet.max(0, y2); |
| 780 | if (y2 > my2) my2 = PApplet.min(height - 1, y2); |
| 781 | } |
| 782 | } |
| 783 | |
| 784 | |
| 785 | protected void loadPixels(int len) { |
no test coverage detected