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!
Vector graphics / SVG
-
- Posts: 74
- Joined: Mon Jan 28, 2019 5:51 am
Re: Vector graphics / SVG
Using vectors (as code, not just static) for the background would be very nice. Would also be good with a pure vector based element. Its of course possible to draw vectors in the canvas, just not always crisp .
If anyone is interested I was asked for an example of the code for the canvas in my modules, I added a sample here:
https://gitlab.com/Flucatcher/voltage-samples
If anyone is interested I was asked for an example of the code for the canvas in my modules, I added a sample here:
https://gitlab.com/Flucatcher/voltage-samples