Skip to content

Commit

Permalink
Add fill/stroke opacity parameters for SVG parameters
Browse files Browse the repository at this point in the history
Adds the missing documentation for the stroke and fill opacity parameters
  • Loading branch information
nyalldawson authored and DelazJ committed Oct 12, 2023
1 parent 24992ab commit bb7d710
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/user_manual/style_library/symbol_selector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -658,14 +658,15 @@ Parametrizable SVG
..................

You have the possibility to change the colors of a :guilabel:`SVG marker`.
You have to add the placeholders ``param(fill)`` for fill color,
``param(outline)`` for stroke color and ``param(outline-width)`` for stroke
width. These placeholders can optionally be followed by a default value, e.g.:
You have to add the placeholders ``param(fill)`` for fill color, ``param(fill-opacity)`` for
fill opacity, ``param(outline)`` and ``param(outline-opacity)`` for stroke color and opacity respectively,
and ``param(outline-width)`` for stroke width. These placeholders can optionally
be followed by a default value, e.g.:

.. code-block:: xml
<svg width="100%" height="100%">
<rect fill="param(fill) #ff0000" stroke="param(outline) #00ff00" stroke-width="param(outline-width) 10" width="100" height="100">
<rect fill="param(fill) #ff0000" fill-opacity="param(fill-opacity) 1" stroke="param(outline) #00ff00" stroke-opacity="param(outline-opacity) 1" stroke-width="param(outline-width) 10" width="100" height="100">
</rect>
</svg>
Expand Down

0 comments on commit bb7d710

Please sign in to comment.