[squeak-dev] The Trunk: Graphics-mt.511.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Apr 21 10:46:51 UTC 2022

Marcel Taeumel uploaded a new version of Graphics to project The Trunk:

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

Name: Graphics-mt.511
Author: mt
Time: 21 April 2022, 12:46:46.247671 pm
UUID: a87224f9-b95c-c14a-b370-6b8aff31ab70
Ancestors: Graphics-tpr.510

In Color, complement #named:put: with #named:, which is also beneficial for STON compatibility.

Note that #fromString: is still more powerful as it supports hex notation and rgb tuples.

=============== Diff against Graphics-tpr.510 ===============

Item was added:
+ ----- Method: Color class>>named: (in category 'instance creation') -----
+ named: colorName
+ 	| colorSym result |
+ 	(colorSym := Symbol lookup: colorName) ifNil: [^ nil].
+ 	result := (self class canUnderstand: colorSym)
+ 		ifTrue: [self perform: colorSym]
+ 		ifFalse: [self classPool at: colorSym ifAbsent: nil].
+ 	^ result isColor ifTrue: [result]!

More information about the Squeak-dev mailing list