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

FlatUIUtils.resetRenderingHints should check for null values #575

Closed
mchmaj opened this issue Aug 12, 2022 · 3 comments
Closed

FlatUIUtils.resetRenderingHints should check for null values #575

mchmaj opened this issue Aug 12, 2022 · 3 comments
Milestone

Comments

@mchmaj
Copy link

mchmaj commented Aug 12, 2022

Hi,
I noticed that some component UIs in FlatLaF save the graphics object rendering hints for antialiasing and stroke control, update them and then re-set the original values after painting is done. However, if the graphics object did not have those hints set in the first place, trying to reset them to original (which is null in that case) can cause an exception to be thrown. This happens for instance in SVGGraphics2D from the jfreesvg library. Adding a check for null in the FlatUIUtils.resetRenderingHints would solve this, it seems.

@DevCharly
Copy link
Collaborator

many thanks for reporting 👍
fixed in latest snapshot: https://github.com/JFormDesigner/FlatLaf#snapshots

@DevCharly DevCharly added this to the 2.5 milestone Aug 12, 2022
@DevCharly
Copy link
Collaborator

@mchmaj
Do you use JFreeSVG to create "screenshots" in SVG format?
I wonder how well this works?

@mchmaj
Copy link
Author

mchmaj commented Sep 2, 2022

We have a screenshot functionality in our system wit a few formats available, among them svg using JFreeSVG. It works quite well.

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

2 participants