Closed ajh123 closed 8 months ago
Thank you, I'm reviewing the changes, there are some changes to be made (mostly because I never thought of SVG and some classes were not ready for it).
Thanks
@mindstorm38
In my dev/svg2
branch I've made a DisplayLayerSVGImage.java and a DisplayLayerSVGMap.java.
Where would you call the constructor for DisplayLayerSVGMap
?
This is great! I don't think that you have to make a record containing URI (it is redundant for the hash as map key), you can also move it to the map class I think. Passing the integer directly to the constructor. To answer your question, you just have to add a else-if case in DisplayLayerManager::getNewLayer
and this should be it! It might be needed to pass the resource and keep it in your map class (maybe improved later, but anyway this will be good enough).
Closed, see #28 for more details.
This adds support for rendering SVG images. SVG images are good because if you make the width / height bigger then the orignal image the image quality will be the same (useful for signs).
To parse SVGs the jsvg has been included and an additional DisplayLayerSVGImage class was added. This class pulls the SVG from the URL, uses jsvg to convert it to a PNG which then gets displayed in a similar way to other images. The WebDisplay's
width
andheight
variables are used to scale the SVG.Demonstration