Allow symbolic colors
authorStefan Vogel <sv@exept.de>
Wed, 27 Feb 2008 16:31:48 +0100
changeset 4914 3f4f8a97190e
parent 4913 2ac2acd451c6
child 4915 440fb8ebb234
Allow symbolic colors
DeviceGraphicsContext.st
--- a/DeviceGraphicsContext.st	Tue Feb 26 11:24:05 2008 +0100
+++ b/DeviceGraphicsContext.st	Wed Feb 27 16:31:48 2008 +0100
@@ -3791,7 +3791,13 @@
     |dither map pixelId p fg bg vOrg ditherDepth deviceDepth|
 
     gcId notNil ifTrue:[
-        (p := paint) isColor ifTrue:[
+        paint isSymbol ifTrue:[
+            "map symbols to colors"
+            paint := Color perform:paint ifNotUnderstood:[Color yellow].
+        ].
+        p := paint. 
+
+        p isColor ifTrue:[
             paint := p := p onDevice:device.
             pixelId := p colorId.
             pixelId notNil ifTrue:[
@@ -3813,7 +3819,7 @@
         ] ifFalse:[
             "mhmh - seems to be some kind of form ..."
             paint := paint onDevice:device.
-            dither := paint
+            dither := paint.
         ].
         "
          a dithered color or image
@@ -3921,7 +3927,7 @@
 !DeviceGraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.116 2007-08-31 09:17:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.117 2008-02-27 15:31:48 stefan Exp $'
 ! !
 
 DeviceGraphicsContext initialize!