Package snap.text
Class TextBoxRun
java.lang.Object
snap.text.TextBoxRun
This class represents a range of characters in a TextBoxLine that have the same style.
-
Constructor Summary
ConstructorDescriptionTextBoxRun
(TextBoxLine aLine, TextStyle aStyle, int aStart, int aEnd) Creates a new TextBoxRun. -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int anIndex) Returns an individual char in run.double
Returns the baseline y value of run.getColor()
Returns the color.int
getEnd()
Returns the end index of this run in line.getFont()
Returns the font.getLine()
Returns the line.double
getMaxX()
Returns the max x location of run.int
getStart()
Returns the start index of this run in line.Returns the string.getStyle()
Returns the run style.double
getWidth()
Returns the width of run.double
getX()
Returns the x location of run.int
length()
Returns the length of run.toString()
Standard toString implementation.Standard toStringProps implementation.
-
Constructor Details
-
TextBoxRun
Creates a new TextBoxRun.
-
-
Method Details
-
getLine
Returns the line. -
getStyle
Returns the run style. -
getFont
Returns the font. -
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
Returns the string. -
toString
Standard toString implementation. -
toStringProps
Standard toStringProps implementation.
-