<div dir="ltr">2 years retention even! Just to be extra sure.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 6:35 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Yeah, one year of retention in the inbox, see how we are cautious with first timers ;)<br></div>Anyway congratulations<br>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/10 Jeff Gonis <span dir="ltr"><<a href="mailto:jeff.gonis@gmail.com" target="_blank">jeff.gonis@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Holy smokes! This was my first ever open source contribution I think, or at least very near to my first. A blast from the past! Thanks for integrating it Nicolas.<br>
</div><div><div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Thu, Jan 9, 2014 at 5:57 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Graphics-jmg.191.mcz" target="_blank">http://source.squeak.org/trunk/Graphics-jmg.191.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Graphics-jmg.191<br>
Author: jmg<br>
Time: 6 January 2012, 2:37:58.42 pm<br>
UUID: 64aae19a-1a36-a346-ae1c-48f25bf77127<br>
Ancestors: Graphics-bf.190<br>
<br>
asColorref was using the color's green element twice, instead of red, green, and blue. Also, Color did not have a symmetrical constructor to create a Color from a colorref. Finally, converting from a float to an integer by using asInteger, rather than round seemed like the wrong thing to do.<br>
<br>
I tested this by iterating through Color class>>indexedColors, and converting them to colorrefs, then creating a Color from the colorref, and comparing the original with the new color. Without rounding I received ~239 failures and with rounding I received ~21 (still to be expected as we are converting a float in the range 0.0 - 1.0 to an integer in the range 0 - 255, so there will still be some error).<br>
<br>
=============== Diff against Graphics-bf.190 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Color class>>fromColorref: (in category 'instance creation') -----<br>
+ fromColorref: aColorref<br>
+ | red green blue |<br>
+ red := aColorref bitAnd: 255.<br>
+ green := (aColorref bitAnd: 65280)<br>
+ >> 8.<br>
+ blue := (aColorref bitAnd: 16711680)<br>
+ >> 16.<br>
+ ^ self r: red g: green b: blue range: 255.!<br>
<br>
Item was changed:<br>
----- Method: Color>>asColorref (in category 'conversions') -----<br>
asColorref<br>
"Convert the receiver into a colorref"<br>
+ ^ (self red * 255) rounded + ((self green * 255) rounded << 8) + ((self blue * 255) rounded << 16)!<br>
- ^(self red * 255) asInteger + ((self green * 255) asInteger << 8) + ((self green * 255) asInteger << 16)!<br>
<br>
<br>
</blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br></div>