Resend - Major issues FXCanvas on Win32 with HiDPI

Tom Schindl tom.schindl at bestsolution.at
Tue Nov 21 21:00:02 UTC 2017


Hi Kevin,

I took a look and was able to come up with fixes for JDK8 (works in all 
my test cases) and JDK9 (improves the situation but I always get same 
DPI no matter what scaling I use) but it at least it improves the 
situation.

I'd highly appreciate if someone could take a look at the the issue!

Tom

Am 2017-11-21 14:13, schrieb Kevin Rushforth:
> Hi Tom,
> 
> There were several Hi-DPI fixes that went into JDK 9. One of them was
> done as part of new API that was added, so that part cannot be
> backported, but other changes could be if a safe fix were found.
> 
> As for finding the problem, the following bugs relating to Hi-DPI and
> interop, and fixed only in 9, might be worth looking at:
> 
> https://bugs.openjdk.java.net/browse/JDK-8091832 (this is the main one)
> https://bugs.openjdk.java.net/browse/JDK-8160073
> https://bugs.openjdk.java.net/browse/JDK-8146920
> 
> -- Kevin
> 
> 
> Tom Schindl wrote:
>> [resending because image in original mail is blocked]
>> 
>> Hi,
>> 
>> Emebedding JavaFX on a HiDPI-Windows computer is producing incorrect
>> results on Java8 and Java9 - see screenshot to attached [1].
>> 
>> I see the following issues:
>> 
>> JDK8:
>> - If swt.autoscale is on (top-right) the Font-Size is invalid
>>   and eg. context-menus pop up at the wrong location
>> - If swt.autoscale is off (top-center) the JavaFX
>>   embedded scene as it should be and conext menus open at the right
>>   position
>> 
>>   But this is not an option as other SWT-Areas who use the GC the 
>> don't
>>   renderer appropriately
>> 
>> JDK9:
>> - If swt.autoscale is on sizes look ok but the embedded scene is 
>> blurred
>>   and eg context-menu is at wrong position and has the wrong font-size
>> 
>> - If swt.autoscale is off (bottom-center) the scene is too small but
>>   context-menu is at the wrong location
>> 
>> I filed this as [1] but I'm
>> writing here because I can not explain the difference between Java8 
>> and
>> Java9 and where I should start looking for a fix.
>> 
>> I did not find anything in the mercurial history explaining that 
>> change.
>> How likely is it that a changes in JDK9 to fix the problems with
>> FXCanvas get backported to Java8?
>> 
>> [1] https://bugs.openjdk.java.net/browse/JDK-8191661
>> 
>> 
>> Tom
>> 
>> 
>> 
>> 


More information about the openjfx-dev mailing list