RFR: 8220484: JFXPanel renders a slanted image with a hidpi monitor scale of 125% or 175%
Kevin Rushforth
kcr at openjdk.java.net
Fri Jun 12 20:45:30 UTC 2020
On Wed, 3 Jun 2020 16:07:24 GMT, Kevin Rushforth <kcr 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.
>
> @Schmidor in general, we don't use the `/issue` command to identify other issues that happen to be fixed by a commit.
> Rather, if they are the same bug, or if one is caused by the other, we would closed the other one as a duplicate. This
> seems like a good thing for me to add to the [CONTRIBUTING](https://github.com/openjdk/jfx/blob/master/CONTRIBUTING.md)
> guidelines.
Even though this is a seemingly simple fix, I'd like @prsadhuk to also review it.
@Schmidor Can you do the following?
1. Provide an evaluation as to why this is the correct fix, and indicate what testing you have done to ensure no
regressions in behavior. Changes to rounding in width and height computations tend to be trickier than they might seem.
2. Provide a test as part of this fix. Ideally, this would be an automated test, in the system tests project (under
`tests/system`), and should set the `glass.win.uiScale` system property to `1.25` before running the test. There are a
few examples you can follow under tests/system that create a JFrame with a JFXPanel and use Robot to verify the
rendered image. If it turns out that an automated is not feasible, a manual test would be an acceptable alternative. 3.
Enter the `/issue remove 8230007` command to remove that issue from this PR. I've already closed
[JDK-8230007](https://bugs.openjdk.java.net/browse/JDK-8230007) in JBS as a duplicate.
-------------
PR: https://git.openjdk.java.net/jfx/pull/246
More information about the openjfx-dev
mailing list