Creates an instance of SvgText.
The x-coordinate for the text's starting position.
The y-coordinate for the text's starting position.
The text content.
add a transformation to the current transformation
add a class
class name to add
handle SVG DOM event
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
Sets the font family for the text.
The font family name (e.g., "Arial", "sans-serif").
The current SvgText instance for chaining.
Sets the font size for the text.
The font size, either as a number (e.g., 12) or a string (e.g., "1.2em").
The current SvgText instance for chaining.
Sets the font weight for the text.
The font weight ("light", "normal", or "bold").
The current SvgText instance for chaining.
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
Sets the horizontal text alignment.
The horizontal alignment ("left", "center", or "right").
The current SvgText instance for chaining.
define the whole transformation
translation
change the vertical alignment
Represents an SVG text element, providing methods for positioning and styling text. It extends
SvgItemto inherit common SVG element functionalities.