The Trunk: Graphics-ct.413.mcz

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

The Trunk: Graphics-ct.413.mcz

commits-2
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-ct.413.mcz

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

Name: Graphics-ct.413
Author: ct
Time: 9 September 2019, 7:54:08.629903 pm
UUID: 3e468ae2-a322-c847-81b2-4029a9ecf6dd
Ancestors: Graphics-mt.410

Color>>#printHtmlString: Use rounding instead of truncations

Fixes #testPrintHtmlString

=============== Diff against Graphics-mt.410 ===============

Item was changed:
  ----- Method: Color>>printHtmlString (in category 'html') -----
  printHtmlString
  "answer a string whose characters are the html representation  
  of the receiver"
+ ^ ((self red * 255) rounded printStringBase: 16 length: 2 padded: true)
+ , ((self green * 255) rounded printStringBase: 16 length: 2 padded: true)
+ , ((self blue * 255) rounded printStringBase: 16 length: 2 padded: true)!
- ^ ((self red * 255) asInteger printStringBase: 16 length: 2 padded: true)
- , ((self green * 255) asInteger printStringBase: 16 length: 2 padded: true)
- , ((self blue * 255) asInteger printStringBase: 16 length: 2 padded: true)!