Class SvgGraphicsElement
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CircleElement, EllipseElement, GElement, ImageElement, LineElement, PathElement, PolygonElement, PolylineElement, RectElement, TextElement, TextPathElement, TSpanElement, UseElement
This class provides common presentation attributes for SVG shapes like rectangles, circles, ellipses, lines, paths, and polygons.
Mirrors the SVG DOM hierarchy where SVGGraphicsElement is the base for renderable elements.
Write-Only vs Read-Write Methods
This class provides two variants for each attribute setter:
- Default methods (e.g.,
fill(),stroke()) - Use an optimized write-only approach. Attribute values are NOT stored on the server and cannot be retrieved viagetAttribute(). - RW methods (e.g.,
fillRW(),strokeRW()) - Use traditionalsetAttribute()which stores values on the server for later retrieval.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumLine cap styles for stroke endings.static enumLine join styles for stroke corners.Nested classes/interfaces inherited from class SvgElement
SvgElement.PreserveAspectRatio -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends SvgGraphicsElement>
TClears all transforms from the element.<T extends SvgGraphicsElement>
TclipPath(ClipPathElement clipPath) Sets a clipping path for this element.<T extends SvgGraphicsElement>
TclipPathRW(ClipPathElement clipPath) Sets a clipping path for this element (read-write).<T extends SvgGraphicsElement>
Tfill(in.virit.color.Color color) Sets the fill color using a Color object.<T extends SvgGraphicsElement>
TSets the fill color using a string value.<T extends SvgGraphicsElement>
Tfill(LinearGradientElement gradient) Sets the fill to use a gradient.<T extends SvgGraphicsElement>
Tfill(PatternElement pattern) Sets the fill to use a pattern.<T extends SvgGraphicsElement>
Tfill(RadialGradientElement gradient) Sets the fill to use a radial gradient.<T extends SvgGraphicsElement>
TfillOpacity(double opacity) Sets the fill opacity.<T extends SvgGraphicsElement>
TfillOpacityRW(double opacity) Sets the fill opacity (read-write).<T extends SvgGraphicsElement>
TfillRW(in.virit.color.Color color) Sets the fill color using a Color object (read-write).<T extends SvgGraphicsElement>
TSets the fill color using a string value (read-write).<T extends SvgGraphicsElement>
TfillRW(LinearGradientElement gradient) Sets the fill to use a gradient (read-write).<T extends SvgGraphicsElement>
TfillRW(PatternElement pattern) Sets the fill to use a pattern (read-write).<T extends SvgGraphicsElement>
TfillRW(RadialGradientElement gradient) Sets the fill to use a radial gradient (read-write).<T extends SvgGraphicsElement>
Tmask(MaskElement mask) Sets a mask for this element.<T extends SvgGraphicsElement>
TmaskRW(MaskElement mask) Sets a mask for this element (read-write).<T extends SvgGraphicsElement>
Tmatrix(double a, double b, double c, double d, double e, double f) Applies a 2D transformation matrix.<T extends SvgGraphicsElement>
TmatrixRW(double a, double b, double c, double d, double e, double f) Applies a 2D transformation matrix (read-write).<T extends SvgGraphicsElement>
TnoFill()Sets the fill to none (transparent).<T extends SvgGraphicsElement>
TnoFillRW()Sets the fill to none (transparent) (read-write).<T extends SvgGraphicsElement>
TnoStroke()Sets the stroke to none (no outline).<T extends SvgGraphicsElement>
TSets the stroke to none (no outline) (read-write).<T extends SvgGraphicsElement>
Topacity(double opacity) Sets the overall opacity of the element (both fill and stroke).<T extends SvgGraphicsElement>
TopacityRW(double opacity) Sets the overall opacity of the element (read-write).<T extends SvgGraphicsElement>
Trotate(double angle) Rotates the element around the origin (0,0).<T extends SvgGraphicsElement>
Trotate(double angle, double cx, double cy) Rotates the element around a specified center point.<T extends SvgGraphicsElement>
TrotateRW(double angle) Rotates the element around the origin (0,0) (read-write).<T extends SvgGraphicsElement>
TrotateRW(double angle, double cx, double cy) Rotates the element around a specified center point (read-write).<T extends SvgGraphicsElement>
Tscale(double factor) Scales the element uniformly.<T extends SvgGraphicsElement>
Tscale(double sx, double sy) Scales the element with different factors for x and y axes.<T extends SvgGraphicsElement>
TscaleRW(double factor) Scales the element uniformly (read-write).<T extends SvgGraphicsElement>
TscaleRW(double sx, double sy) Scales the element with different factors for x and y axes (read-write).<T extends SvgGraphicsElement>
TskewX(double angle) Skews the element along the x axis.<T extends SvgGraphicsElement>
TskewXRW(double angle) Skews the element along the x axis (read-write).<T extends SvgGraphicsElement>
TskewY(double angle) Skews the element along the y axis.<T extends SvgGraphicsElement>
TskewYRW(double angle) Skews the element along the y axis (read-write).<T extends SvgGraphicsElement>
Tstroke(in.virit.color.Color color) Sets the stroke color using a Color object.<T extends SvgGraphicsElement>
TSets the stroke color using a string value.<T extends SvgGraphicsElement>
Tstroke(LinearGradientElement gradient) Sets the stroke to use a gradient.<T extends SvgGraphicsElement>
Tstroke(PatternElement pattern) Sets the stroke to use a pattern.<T extends SvgGraphicsElement>
Tstroke(RadialGradientElement gradient) Sets the stroke to use a radial gradient.<T extends SvgGraphicsElement>
TstrokeDasharray(double... values) Sets the dash pattern for the stroke using numeric values.<T extends SvgGraphicsElement>
TstrokeDasharray(String dasharray) Sets the dash pattern for the stroke.<T extends SvgGraphicsElement>
TstrokeDasharrayRW(double... values) Sets the dash pattern for the stroke using numeric values (read-write).<T extends SvgGraphicsElement>
TstrokeDasharrayRW(String dasharray) Sets the dash pattern for the stroke (read-write).<T extends SvgGraphicsElement>
TstrokeDashoffset(double offset) Sets the offset for the dash pattern.<T extends SvgGraphicsElement>
TstrokeDashoffsetRW(double offset) Sets the offset for the dash pattern (read-write).<T extends SvgGraphicsElement>
TstrokeLinecap(SvgGraphicsElement.LineCap lineCap) Sets the shape of line endings.<T extends SvgGraphicsElement>
TSets the shape of line endings (read-write).<T extends SvgGraphicsElement>
TstrokeLinejoin(SvgGraphicsElement.LineJoin lineJoin) Sets the shape of line corners.<T extends SvgGraphicsElement>
TstrokeLinejoinRW(SvgGraphicsElement.LineJoin lineJoin) Sets the shape of line corners (read-write).<T extends SvgGraphicsElement>
TstrokeMiterlimit(double limit) Sets the miter limit for miter line joins.<T extends SvgGraphicsElement>
TstrokeMiterlimitRW(double limit) Sets the miter limit for miter line joins (read-write).<T extends SvgGraphicsElement>
TstrokeOpacity(double opacity) Sets the stroke opacity.<T extends SvgGraphicsElement>
TstrokeOpacityRW(double opacity) Sets the stroke opacity (read-write).<T extends SvgGraphicsElement>
TstrokeRW(in.virit.color.Color color) Sets the stroke color using a Color object (read-write).<T extends SvgGraphicsElement>
TSets the stroke color using a string value (read-write).<T extends SvgGraphicsElement>
TstrokeRW(LinearGradientElement gradient) Sets the stroke to use a gradient (read-write).<T extends SvgGraphicsElement>
TstrokeRW(PatternElement pattern) Sets the stroke to use a pattern (read-write).<T extends SvgGraphicsElement>
TstrokeRW(RadialGradientElement gradient) Sets the stroke to use a radial gradient (read-write).<T extends SvgGraphicsElement>
TstrokeWidth(double width) Sets the stroke width.<T extends SvgGraphicsElement>
TstrokeWidth(String width) Sets the stroke width with a unit.<T extends SvgGraphicsElement>
TstrokeWidthRW(double width) Sets the stroke width (read-write).<T extends SvgGraphicsElement>
TstrokeWidthRW(String width) Sets the stroke width with a unit (read-write).<T extends SvgGraphicsElement>
TSets the transform attribute directly.<T extends SvgGraphicsElement>
TtransformRW(String transform) Sets the transform attribute directly (read-write).<T extends SvgGraphicsElement>
Ttranslate(double x, double y) Moves the element to a new position.<T extends SvgGraphicsElement>
TtranslateRW(double x, double y) Moves the element to a new position (read-write).<T extends SvgGraphicsElement>
TtranslateX(double x) Moves the element horizontally.<T extends SvgGraphicsElement>
TtranslateXRW(double x) Moves the element horizontally (read-write).<T extends SvgGraphicsElement>
TtranslateY(double y) Moves the element vertically.<T extends SvgGraphicsElement>
TtranslateYRW(double y) Moves the element vertically (read-write).Methods inherited from class SvgElement
emptySvgRoot, flushPendingAttributes, getOuterHTML, getPendingOrAttribute, getStyle, height, height, id, preserveAspectRatio, preserveAspectRatio, scheduleBeforeClientResponse, setAttribute, setWriteOnlyAttribute, size, size, viewBox, width, widthMethods inherited from class com.vaadin.flow.dom.Element
addAttachListener, addDetachListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, as, attachShadow, bindAttribute, bindProperty, bindText, callJsFunction, callJsFunction, createText, executeJs, executeJs, get, get, getAttribute, getAttributeNames, getChild, getChildCount, getChildren, getClassList, getComponent, getParent, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyBean, getPropertyBean, getPropertyNames, getPropertyRaw, getSelf, getShadowRoot, getTag, getText, getTextRecursively, getThemeList, hasAttribute, hasProperty, isEnabled, isTextNode, isVisible, removeAttribute, removeFromParent, removeFromTree, removeFromTree, removeProperty, scrollIntoView, scrollIntoView, setAttribute, setAttribute, setAttribute, setEnabled, setProperty, setProperty, setProperty, setPropertyBean, setPropertyJson, setPropertyList, setPropertyMap, setText, setVisible, toStringMethods inherited from class com.vaadin.flow.dom.Node
accept, appendChild, appendChild, appendVirtualChild, appendVirtualChild, ensureChildHasParent, equals, getNode, getParentNode, getStateProvider, hashCode, indexOfChild, insertChild, insertChild, isVirtualChild, removeAllChildren, removeChild, removeChild, removeChild, removeVirtualChild, removeVirtualChild, setChild
-
Constructor Details
-
SvgGraphicsElement
-
-
Method Details
-
fill
Sets the fill color using a Color object.Uses write-only optimization. Use
fillRW(Color)if you need to read the value back.- Parameters:
color- the fill color- Returns:
- this element for method chaining
-
fill
Sets the fill color using a string value.Uses write-only optimization. Use
fillRW(String)if you need to read the value back.- Parameters:
fill- the fill color (e.g., "red", "#ff0000", "rgb(255,0,0)", "url(#gradient)")- Returns:
- this element for method chaining
-
fillRW
Sets the fill color using a Color object (read-write).- Parameters:
color- the fill color- Returns:
- this element for method chaining
-
fillRW
Sets the fill color using a string value (read-write).- Parameters:
fill- the fill color (e.g., "red", "#ff0000", "rgb(255,0,0)", "url(#gradient)")- Returns:
- this element for method chaining
-
noFill
Sets the fill to none (transparent).Uses write-only optimization. Use
noFillRW()if you need to read the value back.- Returns:
- this element for method chaining
-
noFillRW
Sets the fill to none (transparent) (read-write).- Returns:
- this element for method chaining
-
fillOpacity
Sets the fill opacity.Uses write-only optimization. Use
fillOpacityRW(double)if you need to read the value back.- Parameters:
opacity- the opacity value from 0.0 (fully transparent) to 1.0 (fully opaque)- Returns:
- this element for method chaining
-
fillOpacityRW
Sets the fill opacity (read-write).- Parameters:
opacity- the opacity value from 0.0 (fully transparent) to 1.0 (fully opaque)- Returns:
- this element for method chaining
-
stroke
Sets the stroke color using a Color object.Uses write-only optimization. Use
strokeRW(Color)if you need to read the value back.- Parameters:
color- the stroke color- Returns:
- this element for method chaining
-
stroke
Sets the stroke color using a string value.Uses write-only optimization. Use
strokeRW(String)if you need to read the value back.- Parameters:
stroke- the stroke color (e.g., "black", "#000000", "rgb(0,0,0)", "url(#gradient)")- Returns:
- this element for method chaining
-
strokeRW
Sets the stroke color using a Color object (read-write).- Parameters:
color- the stroke color- Returns:
- this element for method chaining
-
strokeRW
Sets the stroke color using a string value (read-write).- Parameters:
stroke- the stroke color (e.g., "black", "#000000", "rgb(0,0,0)", "url(#gradient)")- Returns:
- this element for method chaining
-
noStroke
Sets the stroke to none (no outline).Uses write-only optimization. Use
noStrokeRW()if you need to read the value back.- Returns:
- this element for method chaining
-
noStrokeRW
Sets the stroke to none (no outline) (read-write).- Returns:
- this element for method chaining
-
strokeWidth
Sets the stroke width.Uses write-only optimization. Use
strokeWidthRW(double)if you need to read the value back.- Parameters:
width- the stroke width in user units- Returns:
- this element for method chaining
-
strokeWidth
Sets the stroke width with a unit.Uses write-only optimization. Use
strokeWidthRW(String)if you need to read the value back.- Parameters:
width- the stroke width (e.g., "2", "2px", "0.5em")- Returns:
- this element for method chaining
-
strokeWidthRW
Sets the stroke width (read-write).- Parameters:
width- the stroke width in user units- Returns:
- this element for method chaining
-
strokeWidthRW
Sets the stroke width with a unit (read-write).- Parameters:
width- the stroke width (e.g., "2", "2px", "0.5em")- Returns:
- this element for method chaining
-
strokeOpacity
Sets the stroke opacity.Uses write-only optimization. Use
strokeOpacityRW(double)if you need to read the value back.- Parameters:
opacity- the opacity value from 0.0 (fully transparent) to 1.0 (fully opaque)- Returns:
- this element for method chaining
-
strokeOpacityRW
Sets the stroke opacity (read-write).- Parameters:
opacity- the opacity value from 0.0 (fully transparent) to 1.0 (fully opaque)- Returns:
- this element for method chaining
-
strokeLinecap
Sets the shape of line endings.Uses write-only optimization. Use
strokeLinecapRW(LineCap)if you need to read the value back.- Parameters:
lineCap- the line cap style- Returns:
- this element for method chaining
-
strokeLinecapRW
Sets the shape of line endings (read-write).- Parameters:
lineCap- the line cap style- Returns:
- this element for method chaining
-
strokeLinejoin
Sets the shape of line corners.Uses write-only optimization. Use
strokeLinejoinRW(LineJoin)if you need to read the value back.- Parameters:
lineJoin- the line join style- Returns:
- this element for method chaining
-
strokeLinejoinRW
Sets the shape of line corners (read-write).- Parameters:
lineJoin- the line join style- Returns:
- this element for method chaining
-
strokeMiterlimit
Sets the miter limit for miter line joins.When two lines meet at a sharp angle and miter join is used, the miter can extend far beyond the stroke width. This limit controls when to switch to a bevel join instead.
Uses write-only optimization. Use
strokeMiterlimitRW(double)if you need to read the value back.- Parameters:
limit- the miter limit (default is 4)- Returns:
- this element for method chaining
-
strokeMiterlimitRW
Sets the miter limit for miter line joins (read-write).- Parameters:
limit- the miter limit (default is 4)- Returns:
- this element for method chaining
-
strokeDasharray
Sets the dash pattern for the stroke.The pattern is specified as a comma or space separated list of lengths. Odd positions define dash lengths, even positions define gap lengths.
Uses write-only optimization. Use
strokeDasharrayRW(String)if you need to read the value back.- Parameters:
dasharray- the dash pattern (e.g., "5,10", "5 10 5", "10,5,5,5")- Returns:
- this element for method chaining
-
strokeDasharray
Sets the dash pattern for the stroke using numeric values.Uses write-only optimization. Use
strokeDasharrayRW(double...)if you need to read the value back.- Parameters:
values- the dash and gap lengths alternating- Returns:
- this element for method chaining
-
strokeDasharrayRW
Sets the dash pattern for the stroke (read-write).- Parameters:
dasharray- the dash pattern (e.g., "5,10", "5 10 5", "10,5,5,5")- Returns:
- this element for method chaining
-
strokeDasharrayRW
Sets the dash pattern for the stroke using numeric values (read-write).- Parameters:
values- the dash and gap lengths alternating- Returns:
- this element for method chaining
-
strokeDashoffset
Sets the offset for the dash pattern.Uses write-only optimization. Use
strokeDashoffsetRW(double)if you need to read the value back.- Parameters:
offset- the offset in user units- Returns:
- this element for method chaining
-
strokeDashoffsetRW
Sets the offset for the dash pattern (read-write).- Parameters:
offset- the offset in user units- Returns:
- this element for method chaining
-
opacity
Sets the overall opacity of the element (both fill and stroke).Uses write-only optimization. Use
opacityRW(double)if you need to read the value back.- Parameters:
opacity- the opacity value from 0.0 (fully transparent) to 1.0 (fully opaque)- Returns:
- this element for method chaining
-
opacityRW
Sets the overall opacity of the element (read-write).- Parameters:
opacity- the opacity value from 0.0 (fully transparent) to 1.0 (fully opaque)- Returns:
- this element for method chaining
-
clipPath
Sets a clipping path for this element.Parts of the element outside the clipping region will not be rendered. An ID is automatically generated for the clip path if not already set.
Uses write-only optimization. Use
clipPathRW(ClipPathElement)if you need to read the value back.- Parameters:
clipPath- the clip path element- Returns:
- this element for method chaining
-
clipPathRW
Sets a clipping path for this element (read-write).- Parameters:
clipPath- the clip path element- Returns:
- this element for method chaining
-
mask
Sets a mask for this element.The mask controls the transparency of the element based on the luminance or alpha values of the mask contents. An ID is automatically generated for the mask if not already set.
Uses write-only optimization. Use
maskRW(MaskElement)if you need to read the value back.- Parameters:
mask- the mask element- Returns:
- this element for method chaining
-
maskRW
Sets a mask for this element (read-write).- Parameters:
mask- the mask element- Returns:
- this element for method chaining
-
fill
Sets the fill to use a gradient.An ID is automatically generated for the gradient if not already set.
Uses write-only optimization. Use
fillRW(LinearGradientElement)if you need to read the value back.- Parameters:
gradient- the gradient element (linear or radial)- Returns:
- this element for method chaining
-
fillRW
Sets the fill to use a gradient (read-write).- Parameters:
gradient- the gradient element (linear or radial)- Returns:
- this element for method chaining
-
fill
Sets the fill to use a radial gradient.An ID is automatically generated for the gradient if not already set.
Uses write-only optimization. Use
fillRW(RadialGradientElement)if you need to read the value back.- Parameters:
gradient- the radial gradient element- Returns:
- this element for method chaining
-
fillRW
Sets the fill to use a radial gradient (read-write).- Parameters:
gradient- the radial gradient element- Returns:
- this element for method chaining
-
fill
Sets the fill to use a pattern.An ID is automatically generated for the pattern if not already set.
Uses write-only optimization. Use
fillRW(PatternElement)if you need to read the value back.- Parameters:
pattern- the pattern element- Returns:
- this element for method chaining
-
fillRW
Sets the fill to use a pattern (read-write).- Parameters:
pattern- the pattern element- Returns:
- this element for method chaining
-
stroke
Sets the stroke to use a gradient.An ID is automatically generated for the gradient if not already set.
Uses write-only optimization. Use
strokeRW(LinearGradientElement)if you need to read the value back.- Parameters:
gradient- the gradient element- Returns:
- this element for method chaining
-
strokeRW
Sets the stroke to use a gradient (read-write).- Parameters:
gradient- the gradient element- Returns:
- this element for method chaining
-
stroke
Sets the stroke to use a radial gradient.An ID is automatically generated for the gradient if not already set.
Uses write-only optimization. Use
strokeRW(RadialGradientElement)if you need to read the value back.- Parameters:
gradient- the radial gradient element- Returns:
- this element for method chaining
-
strokeRW
Sets the stroke to use a radial gradient (read-write).- Parameters:
gradient- the radial gradient element- Returns:
- this element for method chaining
-
stroke
Sets the stroke to use a pattern.An ID is automatically generated for the pattern if not already set.
Uses write-only optimization. Use
strokeRW(PatternElement)if you need to read the value back.- Parameters:
pattern- the pattern element- Returns:
- this element for method chaining
-
strokeRW
Sets the stroke to use a pattern (read-write).- Parameters:
pattern- the pattern element- Returns:
- this element for method chaining
-
transform
Sets the transform attribute directly.Multiple transforms can be specified separated by spaces or commas.
Uses write-only optimization. Use
transformRW(String)if you need to read the value back.- Parameters:
transform- the transform string (e.g., "translate(30,40) rotate(45)")- Returns:
- this element for method chaining
-
transformRW
Sets the transform attribute directly (read-write).- Parameters:
transform- the transform string (e.g., "translate(30,40) rotate(45)")- Returns:
- this element for method chaining
-
translate
Moves the element to a new position.Uses write-only optimization. Use
translateRW(double, double)if you need to read the value back.- Parameters:
x- the x offsety- the y offset- Returns:
- this element for method chaining
-
translateRW
Moves the element to a new position (read-write).- Parameters:
x- the x offsety- the y offset- Returns:
- this element for method chaining
-
translateX
Moves the element horizontally.Uses write-only optimization. Use
translateXRW(double)if you need to read the value back.- Parameters:
x- the x offset- Returns:
- this element for method chaining
-
translateXRW
Moves the element horizontally (read-write).- Parameters:
x- the x offset- Returns:
- this element for method chaining
-
translateY
Moves the element vertically.Uses write-only optimization. Use
translateYRW(double)if you need to read the value back.- Parameters:
y- the y offset- Returns:
- this element for method chaining
-
translateYRW
Moves the element vertically (read-write).- Parameters:
y- the y offset- Returns:
- this element for method chaining
-
rotate
Rotates the element around the origin (0,0).Uses write-only optimization. Use
rotateRW(double)if you need to read the value back.- Parameters:
angle- the rotation angle in degrees- Returns:
- this element for method chaining
-
rotateRW
Rotates the element around the origin (0,0) (read-write).- Parameters:
angle- the rotation angle in degrees- Returns:
- this element for method chaining
-
rotate
Rotates the element around a specified center point.Uses write-only optimization. Use
rotateRW(double, double, double)if you need to read the value back.- Parameters:
angle- the rotation angle in degreescx- the x coordinate of the rotation centercy- the y coordinate of the rotation center- Returns:
- this element for method chaining
-
rotateRW
Rotates the element around a specified center point (read-write).- Parameters:
angle- the rotation angle in degreescx- the x coordinate of the rotation centercy- the y coordinate of the rotation center- Returns:
- this element for method chaining
-
scale
Scales the element uniformly.Uses write-only optimization. Use
scaleRW(double)if you need to read the value back.- Parameters:
factor- the scale factor (1.0 = no change, 0.5 = half size, 2.0 = double size)- Returns:
- this element for method chaining
-
scaleRW
Scales the element uniformly (read-write).- Parameters:
factor- the scale factor (1.0 = no change, 0.5 = half size, 2.0 = double size)- Returns:
- this element for method chaining
-
scale
Scales the element with different factors for x and y axes.Uses write-only optimization. Use
scaleRW(double, double)if you need to read the value back.- Parameters:
sx- the x scale factorsy- the y scale factor- Returns:
- this element for method chaining
-
scaleRW
Scales the element with different factors for x and y axes (read-write).- Parameters:
sx- the x scale factorsy- the y scale factor- Returns:
- this element for method chaining
-
skewX
Skews the element along the x axis.Uses write-only optimization. Use
skewXRW(double)if you need to read the value back.- Parameters:
angle- the skew angle in degrees- Returns:
- this element for method chaining
-
skewXRW
Skews the element along the x axis (read-write).- Parameters:
angle- the skew angle in degrees- Returns:
- this element for method chaining
-
skewY
Skews the element along the y axis.Uses write-only optimization. Use
skewYRW(double)if you need to read the value back.- Parameters:
angle- the skew angle in degrees- Returns:
- this element for method chaining
-
skewYRW
Skews the element along the y axis (read-write).- Parameters:
angle- the skew angle in degrees- Returns:
- this element for method chaining
-
matrix
public <T extends SvgGraphicsElement> T matrix(double a, double b, double c, double d, double e, double f) Applies a 2D transformation matrix.The matrix transforms coordinates as:
x_new = a*x + c*y + e y_new = b*x + d*y + f
Uses write-only optimization. Use
matrixRW(double, double, double, double, double, double)if you need to read the value back.- Parameters:
a- the a component (scale x)b- the b component (skew y)c- the c component (skew x)d- the d component (scale y)e- the e component (translate x)f- the f component (translate y)- Returns:
- this element for method chaining
-
matrixRW
public <T extends SvgGraphicsElement> T matrixRW(double a, double b, double c, double d, double e, double f) Applies a 2D transformation matrix (read-write).- Parameters:
a- the a component (scale x)b- the b component (skew y)c- the c component (skew x)d- the d component (scale y)e- the e component (translate x)f- the f component (translate y)- Returns:
- this element for method chaining
-
clearTransform
Clears all transforms from the element.- Returns:
- this element for method chaining
-