The Inbox: Graphics-ct.442.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Graphics-ct.442.mcz

commits-2
Christoph Thiede uploaded a new version of Graphics to project The Inbox:
http://source.squeak.org/inbox/Graphics-ct.442.mcz

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

Name: Graphics-ct.442
Author: ct
Time: 7 October 2020, 4:51:00.599313 pm
UUID: 5e479960-0629-754b-9899-a0e6cc38e979
Ancestors: Graphics-ct.441

Makes color printing more consistent. #printString does not add brackets, #storeString does.

=============== Diff against Graphics-ct.441 ===============

Item was added:
+ ----- Method: Color>>basicStoreOn: (in category 'printing') -----
+ basicStoreOn: aStream
+
+ aStream
+ nextPutAll: self species name;
+ nextPutAll: ' r: '; print: self red maxDecimalPlaces: 3;
+ nextPutAll: ' g: '; print: self green maxDecimalPlaces: 3;
+ nextPutAll: ' b: '; print: self blue maxDecimalPlaces: 3.!

Item was changed:
  ----- Method: Color>>printOn: (in category 'printing') -----
  printOn: aStream
 
  | name |
  name := self asNontranslucentColor name.
+ name ifNil: [^ self basicStoreOn: aStream].
- name ifNil: [^ self storeOn: aStream].
 
  aStream
  nextPutAll: 'Color ';
  nextPutAll: name.
  self isTranslucent ifTrue: [
  aStream
  nextPutAll: ' alpha: ';
  print: self alpha maxDecimalPlaces: 3].!

Item was changed:
  ----- Method: Color>>storeOn: (in category 'printing') -----
  storeOn: aStream
 
+ aStream nextPut: $(.
+ self basicStoreOn: aStream.
+ aStream nextPut: $).!
- aStream
- nextPutAll: '(' , self species name;
- nextPutAll: ' r: '; print: self red maxDecimalPlaces: 3;
- nextPutAll: ' g: '; print: self green maxDecimalPlaces: 3;
- nextPutAll: ' b: '; print: self blue maxDecimalPlaces: 3;
- nextPutAll: ')'.
- !