Class SvgTextProperties
text
and tspan
SVG elements properties identifying their graphics state. Created for internal usage.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates newSvgTextProperties
instance.SvgTextProperties
(SvgTextProperties textProperties) Creates copy of the providedSvgTextProperties
instance. -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
Gets dash array part of the dash pattern to be used when paths are stroked.float
Gets dash phase part of the dash pattern to be used when paths are stroked.Gets text fill color.float
Gets text fill opacity.float
Gets text line (or stroke) width.Gets text stroke color.float
Gets text stroke opacity.Gets the list ofUnderline
values representing text-decoration horizontal lines that can be an underline, strikethrough or overline.setDashPattern
(float[] dashArray, float dashPhase) Sets a description of the dash pattern to be used when paths are stroked.setFillColor
(Color fillColor) Sets text fill color.setFillOpacity
(float fillOpacity) Sets text fill opacity.setLineWidth
(float lineWidth) Sets text line (or stroke) width.setStrokeColor
(Color strokeColor) Sets text stroke color.setStrokeOpacity
(float strokeOpacity) Sets text stroke opacity.setTextDecoration
(List<Underline> underlineList) Sets the list ofUnderline
values representing text-decoration horizontal lines that can be an underline, strikethrough or overline.
-
Constructor Details
-
SvgTextProperties
public SvgTextProperties()Creates newSvgTextProperties
instance. -
SvgTextProperties
Creates copy of the providedSvgTextProperties
instance.- Parameters:
-
textProperties
-SvgTextProperties
instance to copy
-
-
Method Details
-
getStrokeColor
Gets text stroke color.- Returns:
- stroke color
-
setStrokeColor
Sets text stroke color.- Parameters:
-
strokeColor
- stroke color to set - Returns:
-
this same
SvgTextProperties
instance
-
getFillColor
Gets text fill color.- Returns:
- fill color
-
setFillColor
Sets text fill color.- Parameters:
-
fillColor
- fill color to set - Returns:
-
this same
SvgTextProperties
instance
-
getLineWidth
public float getLineWidth()Gets text line (or stroke) width.- Returns:
- text line width
-
setLineWidth
Sets text line (or stroke) width.- Parameters:
-
lineWidth
- text line width - Returns:
-
this same
SvgTextProperties
instance
-
getStrokeOpacity
public float getStrokeOpacity()Gets text stroke opacity.- Returns:
- stroke opacity
-
setStrokeOpacity
Sets text stroke opacity.- Parameters:
-
strokeOpacity
- stroke opacity to set - Returns:
-
this same
SvgTextProperties
instance
-
getFillOpacity
public float getFillOpacity()Gets text fill opacity.- Returns:
- fill opacity
-
setFillOpacity
Sets text fill opacity.- Parameters:
-
fillOpacity
- fill opacity to set - Returns:
-
this same
SvgTextProperties
instance
-
getTextDecoration
Gets the list ofUnderline
values representing text-decoration horizontal lines that can be an underline, strikethrough or overline.- Returns:
-
the list of
Underline
values
-
setTextDecoration
Sets the list ofUnderline
values representing text-decoration horizontal lines that can be an underline, strikethrough or overline.- Parameters:
-
underlineList
- the list ofUnderline
values to set - Returns:
-
this same
SvgTextProperties
instance
-
getDashArray
public float[] getDashArray()Gets dash array part of the dash pattern to be used when paths are stroked. Default value is solid line.The line dash pattern is expressed as an array of the form [ dashArray dashPhase ], where dashArray is itself an array and dashPhase is an integer.
An empty dash array (first element in the array) and zero phase (second element in the array) can be used to restore the dash pattern to a solid line.
- Returns:
- float dash array
-
getDashPhase
public float getDashPhase()Gets dash phase part of the dash pattern to be used when paths are stroked. Default value is solid line.The line dash pattern is expressed as an array of the form [ dashArray dashPhase ], where dashArray is itself an array and dashPhase is an integer.
An empty dash array (first element in the array) and zero phase (second element in the array) can be used to restore the dash pattern to a solid line.
- Returns:
- float dash array
-
setDashPattern
Sets a description of the dash pattern to be used when paths are stroked. Default value is solid line.The line dash pattern is expressed as an array of the form [ dashArray dashPhase ], where dashArray is itself an array and dashPhase is a number.
An empty dash array (first element in the array) and zero phase (second element in the array) can be used to restore the dash pattern to a solid line.
- Parameters:
-
dashArray
- dash array -
dashPhase
- dash phase value - Returns:
-
this same
SvgTextProperties
instance
-