Testing new script version on MacOXS 10.7.5.
Install is PI-macosx10.6-x86_64-01.08.02.1098-20140624-c.zip with all updates.
I am seeing this error on graphics.end() on a viewport onPaint that draws a bitmap. Current script code below.
Should I not call end()? Or maybe graphics is initialized incorrectly?
Thanks,
Mike
Edit: 10.7.5 may be too old to worry about. As a workaround, I added a try/catch around the end() to catch and ignore the error. Seems to work. Is this OK?
*** Error [000]: /Volumes/BOOTCAMP/Users/Public/Documents/Astronomy/PixInsight/Scripts/SubframeSelector/SubframeSelector.0.102/SubframeSelector/SubframeSelectorBitmapBox.js, line 127: Error: Graphics.end(): the graphics context is not active
this.viewport.onPaint = function(x0, y0, x1, y1) {
var graphics = new Graphics(this);
graphics.fillRect(x0, y0, x1, y1, new Brush(this.dialog.backgroundColor));
if (this.parent.bitmap != null) {
graphics.drawBitmap(
this.parent.bitmapPosition.x - this.parent.scrollPosition.x,
this.parent.bitmapPosition.y - this.parent.scrollPosition.y,
this.parent.bitmap
);
}
graphics.end();
};