RFR: 8220484: JFXPanel renders a slanted image with a hidpi monitor scale of 125% or 175% [v2]

Oliver Schmidtmer github.com+10960818+Schmidor at openjdk.java.net
Tue Jun 30 18:28:21 UTC 2020


On Wed, 17 Jun 2020 07:32:46 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Oliver Schmidtmer has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Change to Math.ceil and add test
>
> In 2D, we normally use sun.java2d.pipe.Region.clipRound as it also checks for -ve/+ve max INTEGER but I guess that is
> internal class to FX so it's ok to use Math.round.  Approval pending test creation.

While both might work, as long as there is no mixed usage of round and ceil, Math.ceil seems to be better.

I'm not sure if the timed waiting for the resizes is the best way for ensuring that the buffer is resized to the new
bounds, so I'm open for suggestions. To me at least it seems to create a reproducible sheared output after the second
resize in the test case and not anymore after changing the calculations to Math.ceil.

-------------

PR: https://git.openjdk.java.net/jfx/pull/246


More information about the openjfx-dev mailing list