[squeak-dev] The Trunk: Graphics-pre.403.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 15 08:40:57 UTC 2018


Patrick Rein uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-pre.403.mcz

==================== Summary ====================

Name: Graphics-pre.403
Author: pre
Time: 15 October 2018, 9:39:42.652742 am
UUID: 95ceb538-97fd-f14a-810b-360432580bd3
Ancestors: Graphics-eem.402

Changes the an initialization method used in one of the instance creation methods to use a more general initialization method and thereby not impose any rounding

=============== Diff against Graphics-eem.402 ===============

Item was changed:
  ----- Method: Color>>setRed:green:blue:range: (in category 'private') -----
  setRed: r green: g blue: b range: range
  	"Initialize this color's r, g, and b components to the given values in the range [0..r]."
  
+ 	^ self setRed: r / range green: g / range blue: b / range!
- 	rgb == nil ifFalse: [self attemptToMutateError].
- 	rgb :=
- 		((((r * ComponentMask) // range) bitAnd: ComponentMask) bitShift: RedShift) +
- 		((((g * ComponentMask) // range) bitAnd: ComponentMask) bitShift: GreenShift) +
- 		 (((b * ComponentMask) // range) bitAnd: ComponentMask).
- 	cachedDepth := nil.
- 	cachedBitPattern := nil.
- !



More information about the Squeak-dev mailing list