diff -r b264b5ca7e35 -r 81c84fab0aac DeviceGraphicsContext.st --- a/DeviceGraphicsContext.st Fri Dec 16 15:54:37 2016 +0100 +++ b/DeviceGraphicsContext.st Fri Dec 16 16:17:03 2016 +0100 @@ -1911,7 +1911,7 @@ settings are ignored and the form is drawn as-is; however, the mask is applied if present. - The form should must have been allocated on the same device, + The form should have been allocated on the same device, otherwise its converted here, which slows down the draw. No transformation or scaling is done. Care must be taken, that the paint color is correctly allocated @@ -1922,7 +1922,7 @@ |id w h easy paintDither depth tmpForm tmpId tmpGCId fgId noColor allColor allBits pX pY - mask maskId deviceForm deviceFormGCId deviceMask colorMap| + mask maskId deviceForm deviceFormGCId deviceMask deviceMaskGcId colorMap| w := aForm width. h := aForm height. @@ -1937,7 +1937,7 @@ ^self ]. id := deviceForm drawableId. - "temporary ..." + "temporary ... what the heck is this??" (id isNil or:[aForm graphicsDevice ~~ device]) ifTrue:[ deviceForm := deviceForm asFormOn:device. @@ -1974,7 +1974,7 @@ ]. maskId := deviceMask drawableId. maskId notNil ifTrue:[ - deviceMask gcId isNil ifTrue:[deviceMask initGC]. + deviceMaskGcId := deviceMask initGC. allColor := Color allColor. allBits := allColor colorId. @@ -1993,7 +1993,7 @@ copyPlaneFromPixmapId:maskId x:0 y:0 - gc:(deviceMask gcId) + gc:deviceMaskGcId to:drawableId x:pX y:pY @@ -2052,9 +2052,8 @@ 'DeviceGraphicsContext [warning]: cannot create temp form' errorPrintCR. ^ self ]. - tmpForm initGC. tmpId := tmpForm drawableId. - tmpGCId := tmpForm gcId. + tmpGCId := tmpForm initGC. " fill tempform with image @@ -2107,7 +2106,7 @@ copyPlaneFromPixmapId:maskId x:0 y:0 - gc:(deviceMask gcId) + gc:deviceMaskGcId to:tmpId x:0 y:0 @@ -2130,7 +2129,7 @@ copyPlaneFromPixmapId:maskId x:0 y:0 - gc:(deviceMask gcId) + gc:deviceMaskGcId to:drawableId x:pX y:pY @@ -2180,7 +2179,7 @@ copyFromPixmapId:id x:0 y:0 - gc:deviceForm gcId + gc:deviceFormGCId to:drawableId x:pX y:pY @@ -3406,11 +3405,11 @@ executor drawableType == #window ifTrue:[ - ^ DeviceWindowGCHandle basicNew - setDevice:self graphicsDevice id:self drawableId gcId:self gcId parentId:parentId. + ^ DeviceWindowGCHandle basicNew + setDevice:device id:drawableId gcId:gcId parentId:parentId. ] ifFalse:[ - ^ DevicePixmapGCHandle basicNew - setDevice:self graphicsDevice id:self drawableId gcId:self gcId. + ^ DevicePixmapGCHandle basicNew + setDevice:device id:drawableId gcId:gcId. ]. !