Color.st
branchjv
changeset 9044 02110132774b
parent 7798 8af654223c89
child 9049 d0233524dfd8
equal deleted inserted replaced
9025:c491c7d396cd 9044:02110132774b
  1306      l open
  1306      l open
  1307     "
  1307     "
  1308 
  1308 
  1309     "Modified: 13.5.1996 / 12:41:53 / cg"
  1309     "Modified: 13.5.1996 / 12:41:53 / cg"
  1310 ! !
  1310 ! !
       
  1311 
  1311 
  1312 
  1312 !Color class methodsFor:'Compatibility-Squeak'!
  1313 !Color class methodsFor:'Compatibility-Squeak'!
  1313 
  1314 
  1314 colorPaletteForDepth: depth extent: chartExtent
  1315 colorPaletteForDepth: depth extent: chartExtent
  1315 	"Squeak mimicri:
  1316 	"Squeak mimicri:
  3807 
  3808 
  3808     "Created: 14.6.1996 / 20:13:22 / cg"
  3809     "Created: 14.6.1996 / 20:13:22 / cg"
  3809     "Modified: 11.7.1996 / 18:20:14 / cg"
  3810     "Modified: 11.7.1996 / 18:20:14 / cg"
  3810 ! !
  3811 ! !
  3811 
  3812 
       
  3813 
  3812 !Color methodsFor:'Compatibility-ST80'!
  3814 !Color methodsFor:'Compatibility-ST80'!
  3813 
  3815 
  3814 asDevicePaintOn:aDevice
  3816 asDevicePaintOn:aDevice
  3815     "ST-80 compatibility: an alias for on:.
  3817     "ST-80 compatibility: an alias for on:.
  3816      create a new Color representing the same color as
  3818      create a new Color representing the same color as
  3941      (Color red) muchLighter
  3943      (Color red) muchLighter
  3942      (Color red) veryMuchLighter
  3944      (Color red) veryMuchLighter
  3943     "
  3945     "
  3944 
  3946 
  3945     "Modified: 11.6.1996 / 18:10:49 / cg"
  3947     "Modified: 11.6.1996 / 18:10:49 / cg"
  3946 !
       
  3947 
       
  3948 newTileMorphRepresentative
       
  3949 	^ ColorTileMorph new colorSwatchColor: self
       
  3950 !
  3948 !
  3951 
  3949 
  3952 privateBlue
  3950 privateBlue
  3953     "Squeak compatibility:
  3951     "Squeak compatibility:
  3954      return the blue components value mapped to 0..MaxValue"
  3952      return the blue components value mapped to 0..MaxValue"
  4243 
  4241 
  4244     ^ 100 - self green
  4242     ^ 100 - self green
  4245 
  4243 
  4246     "Modified: 11.6.1996 / 17:20:07 / cg"
  4244     "Modified: 11.6.1996 / 17:20:07 / cg"
  4247     "Created: 11.6.1996 / 18:30:11 / cg"
  4245     "Created: 11.6.1996 / 18:30:11 / cg"
       
  4246 !
       
  4247 
       
  4248 name
       
  4249     "Return the name of the color or nil, if the color has no standard name"
       
  4250 
       
  4251     StandardColorValues keysAndValuesDo:[ :name :rgb | 
       
  4252         (red = rgb first and:[green = rgb second and:[blue = rgb third]]) ifTrue:[ ^ name ]
       
  4253     ].
       
  4254     ^ nil
       
  4255 
       
  4256     "
       
  4257     Color cyan name    
       
  4258     "
       
  4259 
       
  4260     "Created: / 20-05-2020 / 13:26:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4248 !
  4261 !
  4249 
  4262 
  4250 privateAlpha
  4263 privateAlpha
  4251     "return the internal alpha value (0..255),
  4264     "return the internal alpha value (0..255),
  4252      where 0 is completely transparent and 255 is completely opaque"
  4265      where 0 is completely transparent and 255 is completely opaque"
  5706     ^ '$Header$'
  5719     ^ '$Header$'
  5707 !
  5720 !
  5708 
  5721 
  5709 version_CVS
  5722 version_CVS
  5710     ^ '$Header$'
  5723     ^ '$Header$'
       
  5724 !
       
  5725 
       
  5726 version_HG
       
  5727 
       
  5728     ^ '$Changeset: <not expanded> $'
  5711 ! !
  5729 ! !
  5712 
  5730 
  5713 
  5731 
  5714 Color initialize!
  5732 Color initialize!