[squeak-dev] DamageRecorder>recordInvalidRect: one truncate too far?

tim Rowledge tim at rowledge.org
Thu Feb 4 01:52:22 UTC 2016


>> On 02-02-2016, at 8:01 AM, marcel.taeumel <Marcel.Taeumel at hpi.de> wrote:
>> 
>> Only 184 calling methods to check. :-)

I find myself suspicious about TransformMorph>invalidRect:from: since it has an expandBy:1 that I can’t help thinking was an attempt to trigger later code to round the corners co-ordinates. If scale were fractional then we’d likely get ‘4.5’ type results and so I could imagine someone doing an expandBy:1 to try to end up with ‘4’ instead. #expanded has the extra virtue of keeping us to integer points.

After some futzing around with Scratch code it is clear that when scaling by 2X that the expandBy: is causing the system to display the damage area 1 pixel too far down. Replacing the expandBy: with expanded works much better, so I think we can accept it as an improvement. Scaling by ½ still works nicely as well.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: CMN: Convert to Mayan Numerals




More information about the Squeak-dev mailing list