@@ -2008,7 +2008,10 @@ public void endRaw() {
2008
2008
2009
2009
@ Override
2010
2010
public void loadPixels () {
2011
- if (bitmap == null ) return ;
2011
+ if (bitmap == null ) {
2012
+ throw new RuntimeException ("The pixels array is not available in this " +
2013
+ "renderer withouth a backing bitmap" );
2014
+ }
2012
2015
2013
2016
if ((pixels == null ) || (pixels .length != width * height )) {
2014
2017
pixels = new int [width * height ];
@@ -2027,7 +2030,10 @@ public void loadPixels() {
2027
2030
*/
2028
2031
@ Override
2029
2032
public void updatePixels () {
2030
- if (bitmap == null ) return ;
2033
+ if (bitmap == null ) {
2034
+ throw new RuntimeException ("The pixels array is not available in this " +
2035
+ "renderer withouth a backing bitmap" );
2036
+ }
2031
2037
2032
2038
// WritableRaster raster = ((BufferedImage) image).getRaster();
2033
2039
// raster.setDataElements(0, 0, width, height, pixels);
@@ -2236,7 +2242,10 @@ public void mask(PImage alpha) {
2236
2242
@ Override
2237
2243
public void copy (int sx , int sy , int sw , int sh ,
2238
2244
int dx , int dy , int dw , int dh ) {
2239
- if (bitmap == null ) return ;
2245
+ if (bitmap == null ) {
2246
+ throw new RuntimeException ("The pixels array is not available in this " +
2247
+ "renderer withouth a backing bitmap" );
2248
+ }
2240
2249
2241
2250
// Bitmap bitsy = Bitmap.createBitmap(image, sx, sy, sw, sh);
2242
2251
// rect.set(dx, dy, dx + dw, dy + dh);
0 commit comments