Class SvgTextProperties

java.lang.Object
com.itextpdf.svg.utils.SvgTextProperties

public class SvgTextProperties extends Object
This class represents text and tspan SVG elements properties identifying their graphics state. Created for internal usage.
  • Constructor Details

  • Method Details

    • getLineCapStyle

      public int getLineCapStyle()
      Gets line cap style.
      Returns:
      line cap style
    • setLineCapStyle

      public SvgTextProperties setLineCapStyle (int lineCapStyle)
      Sets line cap style.
      Parameters:
      lineCapStyle - line cap style to set
      Returns:
      this same SvgTextProperties instance
    • getLineJoinStyle

      public int getLineJoinStyle()
      Gets line join style.
      Returns:
      line join style
    • setLineJoinStyle

      public SvgTextProperties setLineJoinStyle (int lineJoinStyle)
      Sets line join style.
      Parameters:
      lineJoinStyle - line join style to set
      Returns:
      this same SvgTextProperties instance
    • getMiterLimit

      public float getMiterLimit()
      Gets miter limit.
      Returns:
      miter limit
    • setMiterLimit

      public SvgTextProperties setMiterLimit (float miterLimit)
      Sets miter limit.
      Parameters:
      miterLimit - miter limit to set
      Returns:
      this same SvgTextProperties instance
    • getStrokeColor

      public Color getStrokeColor()
      Gets text stroke color.
      Returns:
      stroke color
    • setStrokeColor

      public SvgTextProperties setStrokeColor (Color strokeColor)
      Sets text stroke color.
      Parameters:
      strokeColor - stroke color to set
      Returns:
      this same SvgTextProperties instance
    • getFillColor

      public Color getFillColor()
      Gets text fill color.
      Returns:
      fill color
    • setFillColor

      public SvgTextProperties setFillColor (Color fillColor)
      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

      public SvgTextProperties setLineWidth (float lineWidth)
      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

      public SvgTextProperties setStrokeOpacity (float strokeOpacity)
      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

      public SvgTextProperties setFillOpacity (float fillOpacity)
      Sets text fill opacity.
      Parameters:
      fillOpacity - fill opacity to set
      Returns:
      this same SvgTextProperties instance
    • getTextDecoration

      public List<Underline> getTextDecoration()
      Gets the list of Underline values representing text-decoration horizontal lines that can be an underline, strikethrough or overline.
      Returns:
      the list of Underline values
    • setTextDecoration

      public SvgTextProperties setTextDecoration (List<Underline> underlineList)
      Sets the list of Underline values representing text-decoration horizontal lines that can be an underline, strikethrough or overline.
      Parameters:
      underlineList - the list of Underline 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

      public SvgTextProperties setDashPattern (float[] dashArray, float dashPhase)
      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