[Qgis-user] Change colors of SVG symbols
Marco Hugentobler
marco.hugentobler at sourcepole.ch
Wed Jul 20 11:28:38 PDT 2011
Hi Alexandre
The possibility to change svg colors is quite new (after 1.7). You could use
the nightly build from osgeo4w (package 'qgis-dev').
Regards,
Marco
Am Mittwoch, 20. Juli 2011, 19.22:00 schrieb Alexandre Neto:
> I'm trying to use the guideline in the following site to allow QGIS to
> change a SVG symbol colors.
>
> http://www.sourcepole.ch/svg-symbols-in-qgis-with-modifiable-colors
>
> I have created a very simples symbol (a circle) and I have changed the file
> in order to have the following settings:
>
> stroke="param(outline) #002500"
> fill="param(fill) none"
> stroke-width="param(stroke-width) 4"
>
> When I choose it in QGIS (using new symbology), changing the color does
> nothing, and there are no options for changing outline color or outline
> width.
>
> Is this supposed?
>
> I'm qgis 1.7 in windows XP
>
> Thank you very much.
>
> Alexandre Neto
>
>
> My symbol is this:
>
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!-- Created with Inkscape (http://www.inkscape.org/) -->
>
> <svg
> xmlns:dc="http://purl.org/dc/elements/1.1/"
> xmlns:cc="http://creativecommons.org/ns#"
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:svg="http://www.w3.org/2000/svg"
> xmlns="http://www.w3.org/2000/svg"
> xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
> xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
> width="154.00879"
> height="153.97803"
> id="svg2"
> version="1.1"
> inkscape:version="0.48.0 r9654"
> sodipodi:docname="New document 1">
> <defs
> id="defs4" />
> <sodipodi:namedview
> id="base"
> pagecolor="#ffffff"
> bordercolor="#666666"
> borderopacity="1.0"
> inkscape:pageopacity="0.0"
> inkscape:pageshadow="2"
> inkscape:zoom="1.979899"
> inkscape:cx="82.488539"
> inkscape:cy="31.644547"
> inkscape:document-units="px"
> inkscape:current-layer="layer1"
> showgrid="false"
> fit-margin-top="2"
> fit-margin-left="2"
> fit-margin-right="2"
> fit-margin-bottom="2"
> inkscape:window-width="1680"
> inkscape:window-height="1000"
> inkscape:window-x="-4"
> inkscape:window-y="-4"
> inkscape:window-maximized="1" />
> <metadata
> id="metadata7">
> <rdf:RDF>
> <cc:Work
> rdf:about="">
> <dc:format>image/svg+xml</dc:format>
> <dc:type
> rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
> <dc:title></dc:title>
> </cc:Work>
> </rdf:RDF>
> </metadata>
> <g
> inkscape:label="Layer 1"
> inkscape:groupmode="layer"
> id="layer1"
> transform="translate(-128.92857,-123.72754)">
> <path
> sodipodi:type="arc"
> stroke="param(outline) #002500"
> fill="param(fill) none"
> stroke-width="param(stroke-width) 4"
> id="path2985"
> sodipodi:cx="255.71428"
> sodipodi:cy="322.36218"
> sodipodi:rx="75.714287"
> sodipodi:ry="75.714287"
> d="m 331.42857,322.36218 c 0,41.81585 -33.89844,75.71429
> -75.71429,75.71429 -41.81585,0 -75.71429,-33.89844 -75.71429,-75.71429
> 0,-41.81584 33.89844,-75.71428 75.71429,-75.71428 41.81585,0
> 75.71429,33.89844 75.71429,75.71428 z"
> transform="matrix(0.98406746,0,0,0.98406746,-45.711541,-116.50682)"
> />
> </g>
> </svg>
--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Churerstr. 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
More information about the Qgis-user
mailing list