[mapserver-dev] A Question

kiran varma kiran.varma2k7 at gmail.com
Sun Jul 12 10:56:36 EDT 2009


On Sun, Jul 12, 2009 at 8:26 PM, kiran varma <kiran.varma2k7 at gmail.com>wrote:

> Thanks for that! You explained it perfectly! :)
>
>
> On Sun, Jul 12, 2009 at 8:23 PM, Stephen Woodbridge <
> woodbri at swoodbridge.com> wrote:
>
>> kiran varma wrote:
>>
>>> In the IRC that took place on the 8th July, 2009 (
>>> http://logs.qgis.org/mapserver/%23mapserver.2009-07-08.log), 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?
>>>
>>> So far, what I have understood of the overall proposed solution is the
>>> following:
>>>
>>> 1. Trigger the SVG parser and renderer according to
>>>        SYMBOL
>>>                TYPE VECTOR
>>>                FILE "/path/to/file.svg"
>>>        END
>>> 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.
>>> 3. Render the pixmap using a rendering library (such as AGG or GD).
>>>
>>> Why is there a need to have a cache for SVG symbols based on size and
>>> orientation?
>>>
>>
>> I'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.
>>
>> 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.
>>
>> -Steve W
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090712/ec9ad25d/attachment.html


More information about the mapserver-dev mailing list