RFR: 8220484: JFXPanel renders a slanted image with a hidpi monitor scale of 125% or 175% [v4]
Kevin Rushforth
kcr at openjdk.java.net
Wed Jul 8 22:13:42 UTC 2020
On Tue, 7 Jul 2020 10:53:18 GMT, Oliver Schmidtmer <github.com+10960818+Schmidor at openjdk.org> wrote:
>> tests/system/src/test/java/test/robot/javafx/embed/swing/JFXPanelScaledTest.java line 90:
>>
>>> 89: assertEquals(127, pixelsIm.getWidth());
>>> 90: assertEquals(127, pixelsIm.getHeight());
>>> 91:
>>
>> 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.
OK. You can update the PR with your findings.
-------------
PR: https://git.openjdk.java.net/jfx/pull/246
More information about the openjfx-dev
mailing list