{{APIRef("SVG")}}
SVG gradient interface
The SVGGradient
interface is a base interface used by {{ domxref("SVGLinearGradientElement") }} and {{ domxref("SVGRadialGradientElement") }}.
Interface overview
Also implement | {{ domxref("SVGElement") }}, {{ domxref("SVGURIReference") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("SVGStylable") }}, {{ domxref("SVGUnitTypes") }} |
---|---|
Methods | None |
Properties |
|
Constants |
|
Normative document | SVG 1.1 (2nd Edition) |
Constants
Name | Value | Description |
---|---|---|
SVG_SPREADMETHOD_UNKNOWN |
0 | The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. |
SVG_SPREADMETHOD_PAD |
1 | Corresponds to value pad. |
SVG_SPREADMETHOD_REFLECT |
2 | Corresponds to value reflect. |
SVG_SPREADMETHOD_REPEAT |
3 | Corresponds to value repeat. |
Properties
Name | Type | Description |
---|---|---|
gradientUnits |
{{ domxref("SVGAnimatedTransformList") }} | Corresponds to attribute {{ SVGAttr("gradientUnits") }} on the given element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}. |
gradientTransform |
{{ domxref("SVGAnimatedTransformList") }} | Corresponds to attribute {{ SVGAttr("gradientTransform") }} on the given element. |
spreadMethod |
{{ domxref("SVGAnimatedTransformList") }} | Corresponds to attribute {{ SVGAttr("spreadMethod") }} on the given element. One of the Spread Method Types defined on this interface. |
Methods
The SVGGradientElement
interface do not provide any specific methods.
Browser compatibility
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{ CompatNo() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |