codecentric / javafxsvg Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
After I bundle my application with the badass runtime plugin, it doesn't work. I get a long error: https://hastebin.de/avaxetebuf.sql
On retina displays, svgs should be rendered with doubled pixel density. Unfortunately this currently seems to be possible only by adding @2x
to the filename. This seems redundant for svg images, so it'd be great to support this without having to duplicate the original image.
Hi,
I like this library but I was wondering what will happen with it in Java 9?
Internally it uses com.sun.javafx.iio.
Thanks,
Diego
First off, I just want to say: I love this loader. Thanks for making it, it really makes working with SVG a breeze.
One thing I noticed is that when the SVG is drawn, it looks kind of pixellated. Is there any way to ensure anti-aliasing is applied and/or a more aggressive version? At the moment, this is what our logo currently looks like using your plugin:
private Method lookupScaleMethod() throws NoSuchMethodException {
Method scaleMethod;
try {
scaleMethod = Screen.class.getDeclaredMethod("getScale"); // until 8u51
} catch (NoSuchMethodException e) {
scaleMethod = Screen.class.getDeclaredMethod("getRenderScale");
}
scaleMethod.setAccessible(true);
return scaleMethod;
}
Both of these methods no longer work for determining the scale factor for the screen, but Java 9 introduced the public methods screen.getOutputScaleX
and screen.getOutputScaleY
which makes the above code obsolete.
I would have made a pull request instead of an issue, but using these new methods would make the new release incompatible with Java 8 and below, and I don't know how the owner of this repo would prefer to deal with that.
If creating a Java 9+ version of this project is acceptable, I can submit a pull request using these methods.
When you create a image with the width and height parameter set, your SVG-Imageloader will ignore those and pick the default svg-size instead.
new Image("myImage.svg", 100, 100, false, false);
new Image("myImage.svg", 100, 0, true, false);
I debugged a little bit and noticed that BufferedImageTranscoder.setImageSize is called twice. One time with the specified width and height and another time with the default size.
The second time it is called from within SVGAbstractTranscoder.transcode
I really like your SVG support and I'm still using it a lot, but some of my images need to be scaled up first.
Thanks in advanced
Both fitWidth/Height in an ImageView and width/height when loading an Image do not seem to be respected.
See also #5
Using version 1.3.0, though the latest tag in the repo is 1.2.1, huh?
I tried to use javafxsvg but the images are very blurry (see PhoenicisOrg/phoenicis#597).
Hey, i tried today to add your program to test it out
but i got problems with including it into my program.
Is there something wrong with your maven distribution? because in you nexus is no such entry
I used this awesome lib in a 2MB app, but it raised the size to almost 8MB just by using it. Could the size drop in the future or is the "svg support" so resource heavy thing? Thanks
java.lang.IncompatibleClassChangeError: Expected static method 'void com.sun.javafx.iio.ImageStorage.addImageLoaderFactory(com.sun.javafx.iio.ImageLoaderFactory)'
at de.codecentric.centerdevice.javafxsvg.SvgImageLoaderFactory.install(SvgImageLoaderFactory.java:26)
at de.codecentric.centerdevice.javafxsvg.SvgImageLoaderFactory.install(SvgImageLoaderFactory.java:20)
Mac OSX 12.4
Java version 17
openjfx 19-ea+8
I was faced with this bug when using the latest JDK the version is "build 1.8.0_51-b16". Could you accept my pull request that fix it?
Greetings,
Would you be willing to contribute javafxsvg to openjdk.java.net/projects/openjfx ?
If so, and if there is anything I can do to help, please let me know.
Best regards,
Henri
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.