DeviceGraphicsContext.st
changeset 3569 38818408ecae
parent 3530 d90974c7d477
child 3611 8b4384c9e660
--- a/DeviceGraphicsContext.st	Tue Dec 04 15:54:44 2001 +0100
+++ b/DeviceGraphicsContext.st	Tue Dec 04 17:45:42 2001 +0100
@@ -2182,10 +2182,16 @@
                         "
                         aForm depth == 1 ifTrue:[
                             (colorMap := aForm colorMap) notNil ifTrue:[
-                                device 
-                                    setForegroundColor:(colorMap at:2) 
-                                    backgroundColor:(colorMap at:1) 
-                                    in:tmpGCId.
+                                colorMap size < 2 ifTrue:[
+                                    device 
+                                        setForegroundColor:(colorMap at:1) 
+                                        in:tmpGCId.
+                                ] ifFalse:[
+                                    device 
+                                        setForegroundColor:(colorMap at:2) 
+                                        backgroundColor:(colorMap at:1) 
+                                        in:tmpGCId.
+                                ]
                             ].
                             device
                                 copyPlaneFromPixmapId:id
@@ -3864,6 +3870,6 @@
 !DeviceGraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.82 2001-10-18 15:00:25 james Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.83 2001-12-04 16:45:30 cg Exp $'
 ! !
 DeviceGraphicsContext initialize!