equal
deleted
inserted
replaced
3618 b := self percentToDeviceColorValue:blueVal. |
3618 b := self percentToDeviceColorValue:blueVal. |
3619 ^ self colorScaledRed:r scaledGreen:g scaledBlue:b |
3619 ^ self colorScaledRed:r scaledGreen:g scaledBlue:b |
3620 ! |
3620 ! |
3621 |
3621 |
3622 colorScaledRed:red scaledGreen:green scaledBlue:blue |
3622 colorScaledRed:red scaledGreen:green scaledBlue:blue |
|
3623 "return an id for a color. |
|
3624 On trueColor displays, nothing is actually allocated, |
|
3625 and the returned colorID is formed by simply packing the RGB values." |
|
3626 |
3623 visualType == #TrueColor ifTrue:[ |
3627 visualType == #TrueColor ifTrue:[ |
3624 ^ (((red asInteger bitShift:-8) bitShift:redShift) |
3628 ^ (((red asInteger bitShift:-8) bitShift:redShift) |
3625 bitOr:((green asInteger bitShift:-8) bitShift:greenShift)) |
3629 bitOr:((green asInteger bitShift:-8) bitShift:greenShift)) |
3626 bitOr:((blue asInteger bitShift:-8) bitShift:blueShift) |
3630 bitOr:((blue asInteger bitShift:-8) bitShift:blueShift) |
3627 ]. |
3631 ]. |
3628 self subclassResponsibility:'only supported for trueColor displays' |
3632 |
|
3633 self subclassResponsibility:'this fallback is only valid for trueColor displays' |
3629 |
3634 |
3630 "Modified: / 03-02-2014 / 11:30:23 / cg" |
3635 "Modified: / 03-02-2014 / 11:30:23 / cg" |
3631 ! |
3636 ! |
3632 |
3637 |
3633 deviceColorValueToPercent:deviceColorValue |
3638 deviceColorValueToPercent:deviceColorValue |