Vector graphics / SVG
Posted: Sat Apr 04, 2020 12:21 pm
Howdy,
Is there any useful/practical way to create and manipulate vector/SVG graphics from the VM module code? I know I can use SVG files for various GUI elements, but those are just shown "as is", and you can't really manipulate them from the code.
What I would like to do is draw vector shapes from Java code, just like I can draw pixel shapes now on Canvas components using Graphics2D. "Vector shapes" meaning shapes that will stay crisp and hi-res, no matter how much I zoom into the module interface. If I understood correctly, I'd need a 3rd party library to do this, like Apache Batik or JFree, but something tells me that if I just install them on my machine, other users would also need them for the module to work? And probably there are other things too to consider? Or am I missing something really obvious...?
Another slightly related issue: I noticed that VM's SVG support for GUI elements is missing many useful features, like the <use> tag, mix-blend-mode, and probably other things too that would make life a lot easier... A more extensive SVG renderer would be a beautiful thing!
Is there any useful/practical way to create and manipulate vector/SVG graphics from the VM module code? I know I can use SVG files for various GUI elements, but those are just shown "as is", and you can't really manipulate them from the code.
What I would like to do is draw vector shapes from Java code, just like I can draw pixel shapes now on Canvas components using Graphics2D. "Vector shapes" meaning shapes that will stay crisp and hi-res, no matter how much I zoom into the module interface. If I understood correctly, I'd need a 3rd party library to do this, like Apache Batik or JFree, but something tells me that if I just install them on my machine, other users would also need them for the module to work? And probably there are other things too to consider? Or am I missing something really obvious...?
Another slightly related issue: I noticed that VM's SVG support for GUI elements is missing many useful features, like the <use> tag, mix-blend-mode, and probably other things too that would make life a lot easier... A more extensive SVG renderer would be a beautiful thing!