<br><br><div class="gmail_quote">On Sun, Jul 12, 2009 at 8:26 PM, kiran varma <span dir="ltr">&lt;<a href="mailto:kiran.varma2k7@gmail.com">kiran.varma2k7@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for that! You explained it perfectly! :)<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Jul 12, 2009 at 8:23 PM, Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>kiran varma wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In the IRC that took place on the 8th July, 2009 (<a href="http://logs.qgis.org/mapserver/%23mapserver.2009-07-08.log" target="_blank">http://logs.qgis.org/mapserver/%23mapserver.2009-07-08.log</a>), tbonfort mentioned that we would need to create a special cache to hold SVG symbols based on their size and orientation. I am having trouble grasping the need for such a cache. Would it be possible for someone to elaborate on it a little?<br>


<br>
So far, what I have understood of the overall proposed solution is the following:<br>
<br>
1. Trigger the SVG parser and renderer according to<br>
        SYMBOL<br>
                TYPE VECTOR<br>
                FILE &quot;/path/to/file.svg&quot;<br>
        END<br>
2. On triggering, generate a pixmap of the SVG file and store it in cache to prevent having to rasterize it every time. Keep this step in a single function to allow for using different rendering libraries later on. Parsing is done throught the svg_viewer example provided in the AGG sources.<br>


3. Render the pixmap using a rendering library (such as AGG or GD).<br>
<br>
Why is there a need to have a cache for SVG symbols based on size and orientation?<br>
</blockquote>
<br></div></div>
I&#39;m assuming that this is because each size and orientation will generate a different pixmap image. And while it might be possible to rotate and scale an image, I think that this would generate a less than desirable end result.<br>


<br>
If you first rendered an svg image very small and cached that, then later needed a larger version of it, scaling it larger would become pixelated, but if you rerendered it larger then that would look better. Also since these might be rendered with antialiasing, that might not scale or rotate nicely either.<br>


<br>
-Steve W<br>
</blockquote></div><br>
</div></div></blockquote></div><br>