Share via


filterUnits property

Defines the coordinate system for the filter attributes.

This property is read-only.

 

Syntax

HRESULT get_filterUnits(
  [out] SVGAnimatedEnumeration **enumValue
);

Property values

Type: SVGAnimatedEnumeration

One of the following:

Value Condition
userSpaceOnUse userSpaceOnUse

Indicates that all attributes represent values in the current user coordinate system that is in place at the time when the filter is referenced.

objectBoundingBox objectBoundingBox

Indicates that all attributes represent fractions or percentages of the bounding box on the referencing element.

 

Standards information

Remarks

ISVGFilterElement::filterUnits defines the coordinate system for the filter attributes. If filterUnits="userSpaceOnUse", all attributes represent values in the current user coordinate system that is in place at the time when the filter is referenced. If filterUnits="objectBoundingBox", then all attributes represent fractions or percentages of the bounding box on the referencing element. If attribute filterUnits is not specified, then the effect is the same as specifying a value of objectBoundingBox.

Examples

Here's how to specify the units of the element referencing the filter.

<defs>
  <filter id="MyFilter" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="120">
    <feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
  </filter>
</defs>