[Cuis-dev] Layout, belly dance
Juan Vuletich
juan at jvuletich.org
Fri Oct 29 07:45:26 PDT 2021
On 10/29/2021 5:16 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> When a window is dragged arround, its elements are doing a belly dance.
>
> Obverve this video: https://youtu.be/kn5qhPb-8DY
>
> Hilaire
>
> --
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu
This was not a bug in any of the morphic / graphics code, but a
consequence of adopting the supposedly more "advanced" round-haf-to-even
rule for Floats. See See
https://en.wikipedia.org/wiki/Rounding#Round_half_to_even .
Fix was to add back the traditional rounding mode taught in school, as
#roundHAFZ (round half way from zero, i.e. 0.5 -> 1), and use it for
pixel coordinates, essentially for BitBlt.
Fix now at GitHub, with some tests both for Float and Fraction.
Thanks,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211029/8dfad7be/attachment.htm>
More information about the Cuis-dev
mailing list