<Swing Dev> [9] Review request for 8162350 RepaintManager shifts repainted region when the floating point UI scale is used

Jim Graham james.graham at oracle.com
Mon Nov 14 22:48:19 UTC 2016


Hi Alexandr,

On 11/14/2016 7:51 AM, Alexandr Scherbatiy wrote:
>   The current fix tries to adjust the component translation to a value
> which allows to draw a component in the same way when floating point
> scale is used.
>   The scale is converted to the irreducible fraction n / m where m is
> the step under which the component is drawn in the same way.
>   The translation to the zero point is adjusted to the value:
> -translation + translation % m.
>   The backbuffer is enlarged to the value: size + m.

Why not just ensure that you are translating by integer pixel amounts? 
That would work for any scale without add modulus calculations which 
still add slop to the amount of room you need in the buffer...

			...jim



More information about the swing-dev mailing list