Creates an instance of SvgGradient.
The x-coordinate of the starting point of the gradient vector.
The y-coordinate of the starting point of the gradient vector.
The x-coordinate of the ending point of the gradient vector.
The y-coordinate of the ending point of the gradient vector.
The current SvgGradient instance for chaining.
Gets the URL reference to this gradient, suitable for use in fill or stroke attributes.
A string in the format url(#<gradient_id>).
add a transformation to the current transformation
add a class
class name to add
handle SVG DOM event
Adds a color stop to the gradient.
The offset of the color stop, either as a number (0-100) or a percentage string.
The color at this stop.
The current SvgGradient instance for chaining.
Set the shape rendering attribute to control anti-aliasing for shapes.
When enabled, the attribute is set to "auto" to allow smoothing/anti-aliasing. When disabled, the attribute is set to "crispEdges" to favor pixel-aligned, non-anti-aliased rendering.
True to enable anti-aliasing ("auto"), false to disable ("crispEdges").
the current instance to allow chaining).
remove all transformations
change the fill color
return the given attribute if any
the svh element dom
return the attribute as number
the element is not filled
remove a class
class name to remove
Remove all attributes from the underlying DOM element.
The current instance (this) to allow method chaining.
rotation
scaling
define a new attribute
attibute name
attribute value
this
change one style value
change the stroke color
Optionalwidth: numberchange the stroke opacity attribute on the element.
Opacity value where 0 is fully transparent and 1 is fully opaque.
The current instance to allow method chaining.
change the stroke width
define the whole transformation
translation
Represents an SVG linear gradient element. It extends
SvgItemto inherit common SVG element functionalities.