It's possible for small cells to have zero pixels when raster resolution is large. This caused a seg fault in [redd drawSelfOn] when myRasterX and myRasterY failed to be set in [fishCell addRedd]
My solution was to use this code in [fishCell addRedd]:
if(pixelCount > 0)
{
It's possible for small cells to have zero pixels when raster resolution is large. This caused a seg fault in [redd drawSelfOn] when myRasterX and myRasterY failed to be set in [fishCell addRedd]
My solution was to use this code in [fishCell addRedd]: if(pixelCount > 0) {
}
else { [aRedd setRasterX: -1]; [aRedd setRasterY: -1]; }
And this code in [redd drawSelfOn]: if (myRasterX >= 0) { [aRaster ellipseX0: myRasterX - 3 Y0: myRasterY - 2 X1: myRasterX + 3 Y1: myRasterY + 2 Width: 1 Color: myColor];
}