[squeak-dev] The Inbox: Graphics-ct.413.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Sep 11 16:59:45 UTC 2019


Hi Christoph,
either solution is fine, so your solution is fine, +1 for inclusion

It's just that we currently many ways to skin the cat, maybe too many ways.
So we may want to come back to it later, remember Small is beautiful :)

Le mer. 11 sept. 2019 à 13:06, Thiede, Christoph <
Christoph.Thiede at student.hpi.uni-potsdam.de> a écrit :

> Sorry, I wasn't aware of this thread.
>
> How about: Moving the current #asHTMLColor implementation into
> #printHtmlString (without the hashtag, of course), and prepending the
> hashtag in #asHTMLColor?
>
>
> Best,
>
> Christoph
> ------------------------------
> *Von:* Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im
> Auftrag von Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
> *Gesendet:* Montag, 9. September 2019 22:58:13
> *An:* The general-purpose Squeak developers list
> *Betreff:* Re: [squeak-dev] The Inbox: Graphics-ct.413.mcz
>
> Yes, that's one way to fix it.
> The other is in asHTMLColor
> See
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2019-May/202392.html
>
> Le lun. 9 sept. 2019 à 19:54, <commits at source.squeak.org> a écrit :
>
>> A new version of Graphics was added to project The Inbox:
>> http://source.squeak.org/inbox/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)!
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190911/092d8125/attachment.html>


More information about the Squeak-dev mailing list