The vector-effect attribute defines the vector effect to use when drawing an object. These effects are applied before the compositing operations of filters, masks and clips. It has effect only on the <circle>, <ellipse>, <foreignObject>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textPath> <tspan>, and <use> elements.
Note: This effect can also be used as a CSS property.
vector-effect = none | non-scaling-size | non-scaling-stroke | fixed-position | non-rotation
Attribute Values: This attribute accepts the values mentioned above and described below:
- none: It specifies that no vector effect shall be applied. This is the default value of the attribute.
- non-scaling-stroke: It modifies the way an object is stroked. The stroke width is no longer dependent on the transformations of the element and zoom level.
- non-scaling-size: It specifies that the scale of the user coordinate system used by the element and its descendants does not change.
- non-rotation: It specifies that the rotation and skew of the user coordinate system used by the element and its descendants are suppressed.
- fixed-position: It specifies that the position of the user coordinate system used by the element and its descendants is fixed.
Example 1: The example below illustrates the use of the word-spacing attribute using non-scaling-stroke attribute value.
Example 2: Below example illustrates the use of the word-spacing attribute using non-scaling-size attribute value.