Class SvgTextProperties


  • public class SvgTextProperties
    extends java.lang.Object
    This class represents text and tspan SVG elements properties identifying their graphics state. Created for internal usage.
    • Field Detail

      • fillColor

        private Color fillColor
      • strokeColor

        private Color strokeColor
      • fillOpacity

        private float fillOpacity
      • strokeOpacity

        private float strokeOpacity
      • dashArray

        private float[] dashArray
      • dashPhase

        private float dashPhase
      • lineWidth

        private float lineWidth
      • textDecoration

        private java.util.List<Underline> textDecoration
    • Method Detail

      • 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
      • 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 java.util.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​(java.util.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