Gets or sets the content.
Fills an area with a SVG pattern.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.PatternFill
Constructors
Initializes a new instance of the PatternFill class.
Properties
Gets or sets the origin of this pattern brush.
Gets or sets the size of this pattern brush.
Gets or sets the SVG view box of this pattern brush.
Methods
Checks if the specified node references the element represented by this object.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The current canvas context.
- node - Node
- The SVG node.
- id - string
- The defs id that has been stored for this instance by the provided context.
Returns
- ↪boolean
true
ifnode
references the element represented by this instance.
Implements
Assigns the fill defined by this instance to the given SVG element
.
Remarks
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 counter part 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.
Parameters
A map of options to pass to the method.
- element - SVGElement
- The element whose fill should be set.
- context - ICanvasContext
- The context.
See Also
Defined in
Clones this instance by returning a memberwiseClone or this in case this instance is already frozen.
Creates the element that is put into the defs section of the SVG element.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The canvas context that can be used to register brushes etc.
Returns
- ↪SVGElement
- An SVGElement that can be put into the defs section of the SVG element.
Implements
Determines whether this PatternFill is equal to the specified object.
Parameters
A map of options to pass to the method.
Returns
- ↪boolean
Implements
Determines if this instance is frozen.
Defined in
Updates the defs element with the current gradient data.