[squeak-dev] The Trunk: Graphics-nice.288.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jan 10 01:05:27 UTC 2014
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.288.mcz
==================== Summary ====================
Name: Graphics-nice.288
Author: nice
Time: 10 January 2014, 2:02:30.299 am
UUID: 88fb8a17-c76a-48c0-897c-c7c2b4d62314
Ancestors: Graphics-nice.287, Graphics-jmg.191
Merge Graphics-jmg.191 in order to fix for asColorref.
Though, I don't know for which target is this method.... It seems unused in trunk.
=============== Diff against Graphics-nice.287 ===============
Item was added:
+ ----- Method: Color class>>fromColorref: (in category 'instance creation') -----
+ fromColorref: aColorref
+ | red green blue |
+ red := aColorref bitAnd: 16rFF.
+ green := (aColorref bitAnd: 16rFF00)
+ >> 8.
+ blue := (aColorref bitAnd: 16rFF0000)
+ >> 16.
+ ^ self r: red g: green b: blue range: 255.!
Item was changed:
----- Method: Color>>asColorref (in category 'conversions') -----
asColorref
"Convert the receiver into a colorref"
+ ^ (self red * 255) rounded + ((self green * 255) rounded << 8) + ((self blue * 255) rounded << 16)!
- ^(self red * 255) asInteger + ((self green * 255) asInteger << 8) + ((self green * 255) asInteger << 16)!
More information about the Squeak-dev
mailing list
|