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

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Wed Jun 17 07:35:08 UTC 2020

On Wed, 3 Jun 2020 15:46:36 GMT, Oliver Schmidtmer <github.com+10960818+Schmidor at openjdk.org> wrote:

> In edge cases where monitor scaling of 1.25 or 1.75 is active, Math.ceil and Math.round produce different results and
> EmbeddedScene#getPixels in JFXPanel#paintComponent causes an off-by-one error on the line width and therefore sheared
> rendering.  The changes were already proposed by the submitter in JBS-8220484.
> OCA is signed and send.

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.ceil.  Approval pending test creation.


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

More information about the openjfx-dev mailing list