RFR: 8220484: JFXPanel renders a slanted image with a hidpi monitor scale of 125% or 175% [v4]
github.com+10960818+Schmidor at openjdk.java.net
Tue Jul 7 10:55:57 UTC 2020
On Mon, 6 Jul 2020 18:18:20 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Oliver Schmidtmer has refreshed the contents of this pull request, and previous commits have been removed. The
>> incremental views will show differences compared to the previous content of the PR.
> tests/system/src/test/java/test/robot/javafx/embed/swing/JFXPanelScaledTest.java line 90:
>> 89: assertEquals(127, pixelsIm.getWidth());
>> 90: assertEquals(127, pixelsIm.getHeight());
> Where does the `127` come from? If this is derived from the size of the JFXPanel * scale, it isn't likely to work on
> platforms other than Windows (it certainly won't work on Mac, and I suspect not on Linux, but it needs to be tested).
> Also, unless there is a padding of 1 pixel (in user space coordinates), wouldn't it be 125?
I'm using a base size of 101, so that there is a difference between Math.ceil and Math.round for width*1.25.
100 is only the initial size. The Timer changes the bounds first to 201 and then to 101. Without resizing the issue
does not appear. I believe somewhere in the Pulse-Thread? there is also a creation/resizing of the Buffer using
Math.ceil. I'm trying to clarify that now using constants.
My main concern is that the conversion vom JFX to Swing (and SWT, as you mentioned) is consistent, so there are no
wrong line offsets when reading the buffer outside of JFX.
More information about the openjfx-dev