Skip to content

Conversation

@weisJ
Copy link
Contributor

@weisJ weisJ commented May 29, 2023

See #664

@rogerbj
Copy link

rogerbj commented Jul 7, 2023

@weisJ Great work! Just tried the FlatLafDemo and if any ColorFilter has been set using FlatSVGIcon.setColorFilter() or FlatSVGIcon.ColorFilter.setMapper(), nothing happens with jsvg. This can be tested in the FlatLafDemo and in the Extras tab.

@rogerbj
Copy link

rogerbj commented Jul 7, 2023

@weisJ I also ran into a problem in FlatSVGIcon.loadFromStream():

URI dummyUri = new URI( "inputStreamSVG", "/flatlaf-stream-" + streamNumber++, null );

It produces an "Invalid protocol: inputStreamSVG" error.

Except for this and my other report it works a lot better with randomly tested SVGs as opposed with SvgSalmander that fail with those.

@DevCharly
Copy link
Collaborator

@weisJ many thanks for the PR and for JSVG 👍
@rogerbj thanks for testing.

I've reviewed it and fixed in color filter and loading from input stream issues.
Have also simplified the code a little bit by replacing internal use of URI with URL.
(URI was used/required for svgSalamander)

Will test this PR and JSVG in some other projects in the next weeks...

@weisJ
Copy link
Contributor Author

weisJ commented Jul 17, 2023

Note that I had originally not changed the cache to take URLs as keys due to this problem: https://errorprone.info/bugpattern/URLEqualsHashCode

@DevCharly
Copy link
Collaborator

Many thanks for this hint. Didn't know that. Changed the cache key from URL to String to avoid that.

@DevCharly DevCharly added this to the 3.2 milestone Jul 17, 2023
@DevCharly DevCharly merged commit 3c9051e into JFormDesigner:main Jul 30, 2023
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

Successfully merging this pull request may close these issues.

3 participants