Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 9+ Windows Display Scaling and chart rendering #170

Closed
colomb001 opened this issue Sep 17, 2020 · 5 comments
Closed

Java 9+ Windows Display Scaling and chart rendering #170

colomb001 opened this issue Sep 17, 2020 · 5 comments

Comments

@colomb001
Copy link

colomb001 commented Sep 17, 2020

With Java 9 adding support for HiDPI monitors and resolution scaling, chart rendering quality suffers greatly on monitors with non 100% scaling values under Windows 10. This can be alleviated by turning off ChartPanel double buffering. It would be nice to retain double buffering for ChartPanels and not have rendering issues with resolution scaling turned on.

With double buffering enabled: doubleBuffering

With double buffering disabled: noDoubleBuffering

@trashgod
Copy link
Contributor

See also this forum thread.

@colomb001
Copy link
Author

See also this forum thread.

That thread contains two posts, both from me. Unfortunately, neither provide a solution.

@trashgod
Copy link
Contributor

I though the link might be useful to others.

@DrBAXA
Copy link
Contributor

DrBAXA commented Oct 21, 2020

I did get the same issue on 4k screens.
The problem is that image buffer with enabled buffering is created with the size of logical resolution provided by Swing. Real screen resolution is higher. Without buffering renderer uses something like vector graphics and Swing can manage this to look good but when first rendered into the image it can't be properly upscaled to the higher resolution.

I have solved this issue and created pull request #179 , however, it looks slightly like a hack so I'm not sure if it should be accepted.

@jfree
Copy link
Owner

jfree commented Oct 22, 2020

The fix looks good, I merged the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants