Package snap.text

Class TextBoxRun

java.lang.Object
snap.text.TextBoxRun

public class TextBoxRun extends Object
This class represents a range of characters in a TextBoxLine that have the same style.
  • Constructor Details

    • TextBoxRun

      public TextBoxRun(TextBoxLine aLine, TextStyle aStyle, int aStart, int aEnd)
      Creates a new TextBoxRun.
  • Method Details

    • getLine

      public TextBoxLine getLine()
      Returns the line.
    • getStyle

      public TextStyle getStyle()
      Returns the run style.
    • getFont

      public Font getFont()
      Returns the font.
    • getColor

      public Color getColor()
      Returns the color.
    • getStart

      public int getStart()
      Returns the start index of this run in line.
    • getEnd

      public int getEnd()
      Returns the end index of this run in line.
    • length

      public int length()
      Returns the length of run.
    • charAt

      public char charAt(int anIndex)
      Returns an individual char in run.
    • getX

      public double getX()
      Returns the x location of run.
    • getWidth

      public double getWidth()
      Returns the width of run.
    • getMaxX

      public double getMaxX()
      Returns the max x location of run.
    • getBaseline

      public double getBaseline()
      Returns the baseline y value of run.
    • getString

      public String getString()
      Returns the string.
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object
    • toStringProps

      public String toStringProps()
      Standard toStringProps implementation.