--- a/DevGC.st Mon Jan 13 22:57:22 1997 +0100
+++ b/DevGC.st Mon Jan 13 23:03:49 1997 +0100
@@ -2884,26 +2884,28 @@
|fgPixel bgPixel oldFunction|
- fgPixel := (Black on:device) colorId.
- bgPixel := (White on:device) colorId.
+ fgPixel := device blackColor colorId.
+ bgPixel := device whiteColor colorId.
gcId isNil ifTrue:[
- self initGC
+ self initGC
].
oldFunction := function.
device setForeground:(fgPixel bitXor:bgPixel)
- background:bgPixel
- in:gcId.
+ background:bgPixel
+ in:gcId.
device setFunction:#xor in:gcId.
aBlock value.
paint := nil. "invalidate"
- foreground := Black.
- background := White.
+ foreground := device blackColor.
+ background := device whiteColor.
device setForeground:fgPixel
- background:bgPixel
- in:gcId.
+ background:bgPixel
+ in:gcId.
device setFunction:oldFunction in:gcId.
function := oldFunction
+
+ "Modified: 13.1.1997 / 23:03:20 / cg"
! !
!DeviceGraphicsContext methodsFor:'filling'!
@@ -3053,36 +3055,36 @@
self createGC.
- foreground isNil ifTrue:[foreground := Black].
- background isNil ifTrue:[background := White].
+ foreground isNil ifTrue:[foreground := device blackColor].
+ background isNil ifTrue:[background := device whiteColor].
foreground isColor ifTrue:[
- "get device colors from the device indep. colors"
- foreground := foreground on:device.
- fgId := foreground colorId.
- fgId isNil ifTrue:[
- (foreground grayIntensity >= 50) ifTrue:[
- fgId := device whitepixel
- ] ifFalse:[
- fgId := device blackpixel
- ]
- ].
+ "get device colors from the device indep. colors"
+ foreground := foreground on:device.
+ fgId := foreground colorId.
+ fgId isNil ifTrue:[
+ (foreground grayIntensity >= 50) ifTrue:[
+ fgId := device whitepixel
+ ] ifFalse:[
+ fgId := device blackpixel
+ ]
+ ].
] ifFalse:[
- fgId := device blackpixel.
+ fgId := device blackpixel.
].
background isColor ifTrue:[
- background := background on:device.
- bgId := background colorId.
- bgId isNil ifTrue:[
- (background grayIntensity >= 50) ifTrue:[
- bgId := device whitepixel
- ] ifFalse:[
- bgId := device blackpixel
- ]
- ].
+ background := background on:device.
+ bgId := background colorId.
+ bgId isNil ifTrue:[
+ (background grayIntensity >= 50) ifTrue:[
+ bgId := device whitepixel
+ ] ifFalse:[
+ bgId := device blackpixel
+ ]
+ ].
] ifFalse:[
- bgId := device whitepixel
+ bgId := device whitepixel
].
"now, this is something the device can work with ..."
@@ -3097,22 +3099,22 @@
or:[(lineStyle ~~ #solid)
or:[(capStyle ~~ #butt)
or:[joinStyle ~~ #miter]]]) ifTrue:[
- device setLineWidth:lineWidth
- style:lineStyle
- cap:capStyle
- join:joinStyle
- in:gcId
+ device setLineWidth:lineWidth
+ style:lineStyle
+ cap:capStyle
+ join:joinStyle
+ in:gcId
].
mask notNil ifTrue:[
- (mask depth == 1) ifTrue:[
- device setBitmapMask:(mask id) in:gcId
- ] ifFalse:[
- device setPixmapMask:(mask id) in:gcId
- ].
- maskOrigin notNil ifTrue:[
- device setMaskOriginX:maskOrigin x y:maskOrigin y in:gcId
- ]
+ (mask depth == 1) ifTrue:[
+ device setBitmapMask:(mask id) in:gcId
+ ] ifFalse:[
+ device setPixmapMask:(mask id) in:gcId
+ ].
+ maskOrigin notNil ifTrue:[
+ device setMaskOriginX:maskOrigin x y:maskOrigin y in:gcId
+ ]
].
(function ~~ #copy) ifTrue:[device setFunction:function in:gcId].
@@ -3126,6 +3128,8 @@
"/ id notNil ifTrue:[
"/ device setFont:id in:gcId
"/ ]
+
+ "Modified: 13.1.1997 / 23:02:13 / cg"
!
initialize
@@ -3349,6 +3353,6 @@
!DeviceGraphicsContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/DevGC.st,v 1.24 1997-01-10 18:03:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/DevGC.st,v 1.25 1997-01-13 22:03:49 cg Exp $'
! !
DeviceGraphicsContext initialize!
--- a/DeviceGraphicsContext.st Mon Jan 13 22:57:22 1997 +0100
+++ b/DeviceGraphicsContext.st Mon Jan 13 23:03:49 1997 +0100
@@ -2884,26 +2884,28 @@
|fgPixel bgPixel oldFunction|
- fgPixel := (Black on:device) colorId.
- bgPixel := (White on:device) colorId.
+ fgPixel := device blackColor colorId.
+ bgPixel := device whiteColor colorId.
gcId isNil ifTrue:[
- self initGC
+ self initGC
].
oldFunction := function.
device setForeground:(fgPixel bitXor:bgPixel)
- background:bgPixel
- in:gcId.
+ background:bgPixel
+ in:gcId.
device setFunction:#xor in:gcId.
aBlock value.
paint := nil. "invalidate"
- foreground := Black.
- background := White.
+ foreground := device blackColor.
+ background := device whiteColor.
device setForeground:fgPixel
- background:bgPixel
- in:gcId.
+ background:bgPixel
+ in:gcId.
device setFunction:oldFunction in:gcId.
function := oldFunction
+
+ "Modified: 13.1.1997 / 23:03:20 / cg"
! !
!DeviceGraphicsContext methodsFor:'filling'!
@@ -3053,36 +3055,36 @@
self createGC.
- foreground isNil ifTrue:[foreground := Black].
- background isNil ifTrue:[background := White].
+ foreground isNil ifTrue:[foreground := device blackColor].
+ background isNil ifTrue:[background := device whiteColor].
foreground isColor ifTrue:[
- "get device colors from the device indep. colors"
- foreground := foreground on:device.
- fgId := foreground colorId.
- fgId isNil ifTrue:[
- (foreground grayIntensity >= 50) ifTrue:[
- fgId := device whitepixel
- ] ifFalse:[
- fgId := device blackpixel
- ]
- ].
+ "get device colors from the device indep. colors"
+ foreground := foreground on:device.
+ fgId := foreground colorId.
+ fgId isNil ifTrue:[
+ (foreground grayIntensity >= 50) ifTrue:[
+ fgId := device whitepixel
+ ] ifFalse:[
+ fgId := device blackpixel
+ ]
+ ].
] ifFalse:[
- fgId := device blackpixel.
+ fgId := device blackpixel.
].
background isColor ifTrue:[
- background := background on:device.
- bgId := background colorId.
- bgId isNil ifTrue:[
- (background grayIntensity >= 50) ifTrue:[
- bgId := device whitepixel
- ] ifFalse:[
- bgId := device blackpixel
- ]
- ].
+ background := background on:device.
+ bgId := background colorId.
+ bgId isNil ifTrue:[
+ (background grayIntensity >= 50) ifTrue:[
+ bgId := device whitepixel
+ ] ifFalse:[
+ bgId := device blackpixel
+ ]
+ ].
] ifFalse:[
- bgId := device whitepixel
+ bgId := device whitepixel
].
"now, this is something the device can work with ..."
@@ -3097,22 +3099,22 @@
or:[(lineStyle ~~ #solid)
or:[(capStyle ~~ #butt)
or:[joinStyle ~~ #miter]]]) ifTrue:[
- device setLineWidth:lineWidth
- style:lineStyle
- cap:capStyle
- join:joinStyle
- in:gcId
+ device setLineWidth:lineWidth
+ style:lineStyle
+ cap:capStyle
+ join:joinStyle
+ in:gcId
].
mask notNil ifTrue:[
- (mask depth == 1) ifTrue:[
- device setBitmapMask:(mask id) in:gcId
- ] ifFalse:[
- device setPixmapMask:(mask id) in:gcId
- ].
- maskOrigin notNil ifTrue:[
- device setMaskOriginX:maskOrigin x y:maskOrigin y in:gcId
- ]
+ (mask depth == 1) ifTrue:[
+ device setBitmapMask:(mask id) in:gcId
+ ] ifFalse:[
+ device setPixmapMask:(mask id) in:gcId
+ ].
+ maskOrigin notNil ifTrue:[
+ device setMaskOriginX:maskOrigin x y:maskOrigin y in:gcId
+ ]
].
(function ~~ #copy) ifTrue:[device setFunction:function in:gcId].
@@ -3126,6 +3128,8 @@
"/ id notNil ifTrue:[
"/ device setFont:id in:gcId
"/ ]
+
+ "Modified: 13.1.1997 / 23:02:13 / cg"
!
initialize
@@ -3349,6 +3353,6 @@
!DeviceGraphicsContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.24 1997-01-10 18:03:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.25 1997-01-13 22:03:49 cg Exp $'
! !
DeviceGraphicsContext initialize!