C

RadialGradient

Fills an area with a radial gradient.
ImplementsInheritance Hierarchy

Members

Show:

Constructors

Initializes a new instance of the RadialGradient class.

Parameters

Properties

Gets or sets the center of this radial gradient.
conversionfinal

Property Value

The center of this radial gradient defined as ratio from 0 to 1.
Gets or sets the origin of this radial gradient.
conversionfinal

Property Value

The origin of this radial gradient defined as ratio from 0 to 1.
Gets or sets the gradient stops of this brush.
final

Property Value

The gradient stops of this brush.
Gets or sets the radius of the largest circle of this radial gradient in horizontal direction.
final

Property Value

The radius of the largest circle of this radial gradient in horizontal direction defined as ratio from 0 to 1.
Gets or sets the radius of the largest circle of this radial gradient in vertical direction.
final

Property Value

The radius of the largest circle of this radial gradient in vertical direction defined as ratio from 0 to 1.
Gets or sets the spread method of this gradient.
conversionfinal

Property Value

The spread method of this gradient.

Methods

Callback method that checks if the specified node references the element represented by this instance.
SvgDefsManager iterates elements during cleanUpDefs in the SVG DOM and calls this method to check if the element references the defs element createDefsElement created by this instance. If no element is accepted by this method, the created element will become eligible for removal from the defs section.
final

Parameters

context: ICanvasContext
The current canvas context.
item: Node
One SVG node from the SVG DOM.
id: string
The defs id that has been stored for this instance by the provided context.

Return Value

boolean
true if node references the element represented by this instance.
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.applyTo
Clones this instance by returning a memberwise clone, or by returning this if this instance is frozen.

Return Value

Object
An instance of the same type as this instance.

Defined in

Fill.clone
Creates a new SVG gradient that corresponds to this gradient brush.
final

Parameters

context: ICanvasContext
The current canvas context.

Return Value

SVGElement
A new SVG gradient that corresponds to this gradient brush.
Freezes and returns this instance.
Freezing an object makes it immutable, which can result in performance enhancements.
final

Return Value

Fill
This instance, made immutable.

Overrides

Fill.freeze
Determines whether this RadialGradient is equal to the specified object.
final

Parameters

fill: Fill
The other Fill instance to compare.

Return Value

boolean
true, if this Color is equal to the other object; false, otherwise.
Determines if this instance is frozen.
final

Return Value

boolean
true if this instance is frozen; otherwise, false.

Defined in

Fill.isFrozen
Creates a new SVG gradient that corresponds to this gradient brush.
final

Return Value

SVGElement
A new SVG gradient that corresponds to this gradient brush
Updates the SVG gradient within the defs section of the SVG document if it has changed.
final

Parameters

context: ICanvasContext
The context.
oldElement: SVGElement
The old element.
Updates the SVG gradient within the defs section of the SVG document if it has changed.
final

Parameters

oldElement: SVGElement
The old element.
context: ICanvasContext
The context.