Color.st
changeset 4315 20e950100947
parent 4244 f1bdf99773bd
child 4342 2df47b61c415
--- a/Color.st	Fri Oct 15 19:10:08 2004 +0200
+++ b/Color.st	Sat Oct 16 14:30:10 2004 +0200
@@ -3792,6 +3792,7 @@
     "return the blue component in percent [0..100]"
 
     (blue isNil and:[colorId notNil]) ifTrue:[
+        device isNil ifTrue:[^ 0].
         device getRGBFrom:colorId into:[:r :g :b | ^ b].
     ].
     ^ blue * 100.0 / MaxValue
@@ -3895,6 +3896,7 @@
     "return the green component in percent [0..100]"
 
     (green isNil and:[colorId notNil]) ifTrue:[
+        device isNil ifTrue:[^ 0].
         device getRGBFrom:colorId into:[:r :g :b | ^ g].
     ].
     ^ green * 100.0 / MaxValue
@@ -4000,6 +4002,7 @@
     "return the red component in percent [0..100]"
 
     (red isNil and:[colorId notNil]) ifTrue:[
+        device isNil ifTrue:[^ 0].
         device getRGBFrom:colorId into:[:r :g :b | ^ r].
     ].
     red isNil ifTrue:[^ 0].
@@ -5335,7 +5338,7 @@
 !Color class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.193 2004-09-14 12:07:24 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.194 2004-10-16 12:30:10 cg Exp $'
 ! !
 
 Color initialize!