Fills an area with a specified CSS or SVG color value.
Implements
- I
Remarks
This fill supports color values specified by CSS. Please note that not all color values, such as gradients, are supported as attributes in SVG shapes. Those will only work in HTML styles.
See Also
Members
Show:
Constructors
Properties
Gets the color value for this Fill.
Gets the color value for this Fill.
readonlyfinal
Methods
Assigns the fill defined by this instance to the given SVG element.
Assigns the fill defined by this instance to the given SVG
element.If this Fill is a gradient and implements the ISvgDefsCreator interface, it will be added to the defs section of the SVG document per the context. The fill of the given element will be set to a reference to the gradient element.
This method is very similar in functionality to its static method counterpart setFill. However since this method is an instance method, it cannot be called on empty/null fills. If you are unsure whether the reference actually points to an instance, use the static helper method instead.
final
Parameters
- element: SVGElement
- The element whose fill should be set.
- context: ICanvasContext
- The context.
See Also
API
- setFill
Defined in
Fill.applyToFreezes and returns this instance.
Freezes and returns this instance.
Freezing an object makes it immutable, which can result in performance enhancements.
Return Value
- Fill
- This instance, made immutable.