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

FillPattern needs also Batik bridge #1

Open
ma15569 opened this issue Nov 17, 2022 · 2 comments
Open

FillPattern needs also Batik bridge #1

ma15569 opened this issue Nov 17, 2022 · 2 comments

Comments

@ma15569
Copy link
Member

ma15569 commented Nov 17, 2022

I recently tried to use SVG as fill pattern via this plugin (copy a SVG into EXT/FillPattern folder and lunch OpenJUMP.
I had this error when I started OpenJUMP meaning that the plugin requires some extra Batik classes not embedded into OpenJUMP.
Peppe

java.lang.NoClassDefFoundError: org/apache/batik/bridge/UserAgent
at com.cadplan.fill_patterns.jump.SVGRasterizer.setImageWidth(SVGRasterizer.java:111)
at com.cadplan.fill_patterns.jump.LoadFillPatterns.loadNames(LoadFillPatterns.java:164)
at com.cadplan.fill_patterns.jump.LoadFillPatterns.(LoadFillPatterns.java:72)
at com.cadplan.fill_patterns.jump.FillPatternsPlugIn.initialize(FillPatternsPlugIn.java:56)
at com.cadplan.fill_patterns.jump.FillPatternsExtension.configure(FillPatternsExtension.java:45)
at com.vividsolutions.jump.workbench.plugin.PlugInManager.loadConfigurations(PlugInManager.java:258)
at com.vividsolutions.jump.workbench.plugin.PlugInManager.load(PlugInManager.java:237)
at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:461)
at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:396)

@edeso
Copy link
Member

edeso commented Nov 17, 2022

can you please check if placing
https://repo1.maven.org/maven2/org/apache/xmlgraphics/batik-bridge/1.6.1/batik-bridge-1.6.1.jar
into lib/ resolves the issue?

looks like there is no real functionality of batik-bridge used, so maybe we can replace the dependency in some clever way

public void setImageWidth(float width) {
hints.put(ImageTranscoder.KEY_WIDTH, width);
}

@ma15569
Copy link
Member Author

ma15569 commented Nov 24, 2022

Hi Ede,
I tried with batik bridge having the same errors.
(to reproduce this error, copy any SVG into the folder OJ/lib/ext/FillPatterns)

I also discover that the error comes also if I want to use an SVG as vertex symbology via embedded OpenJUMP style plugin (Style-Change Style-Vertex sym. enabled-use bitmap-load bitmap as svg).

The problem should affect also CadPlan vertex symbology. I had no error message back but the plugin dialog seems not todisplay any extenal symbols
(to reproduce this error, copy any SVG into the folder OJ/lib/ext/VertexImages)

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