Modifier and Type | Field and Description |
---|---|
private float |
ascent |
(package private) int |
cacheIndex |
(package private) float |
cacheWidth |
(package private) int[] |
charIndices |
private float |
descent |
(package private) int |
flags |
(package private) static int |
FLAGS_CANONICAL |
(package private) static int |
FLAGS_COMPACT |
(package private) static int |
FLAGS_COMPLEX |
(package private) static int |
FLAGS_EMBEDDED |
(package private) static int |
FLAGS_LEFT_BEARING |
(package private) static int |
FLAGS_LINEBREAK |
(package private) static int |
FLAGS_NO_LINK_AFTER |
(package private) static int |
FLAGS_NO_LINK_BEFORE |
(package private) static int |
FLAGS_RIGHT_BEARING |
(package private) static int |
FLAGS_SOFTBREAK |
(package private) static int |
FLAGS_SPLIT |
(package private) static int |
FLAGS_SPLIT_LAST |
(package private) static int |
FLAGS_TAB |
(package private) int[] |
gids |
(package private) int |
glyphCount |
private float |
leading |
(package private) int |
length |
(package private) byte |
level |
(package private) TextLine |
line |
(package private) Point2D |
location |
(package private) float[] |
positions |
(package private) int |
script |
(package private) int |
slot |
(package private) TextSpan |
span |
(package private) int |
start |
(package private) float |
width |
Constructor and Description |
---|
TextRun(int start,
int length,
byte level,
boolean complex,
int script,
TextSpan span,
int slot,
boolean canonical) |
Modifier and Type | Method and Description |
---|---|
float |
getAdvance(int glyphIndex) |
float |
getAscent() |
int |
getCharOffset(int glyphIndex)
Maps the given glyph index to the char offset.
|
float |
getDescent() |
int |
getEnd() |
int |
getGlyphAtX(float x,
int[] trailing) |
int |
getGlyphCode(int glyphIndex)
Returns the glyph code for the given glyphIndex.
|
int |
getGlyphCount()
Returns the number of glyphs in GlyphList.
|
int |
getGlyphIndex(int charOffset) |
float |
getHeight()
Returns the height of the GlyphList
|
float |
getLeading() |
int |
getLength() |
byte |
getLevel() |
RectBounds |
getLineBounds()
See TextLine#getBounds()
(used outside text layout in rendering and span bounds)
|
Point2D |
getLocation()
The top-left location of the GlyphList relative to
the origin of the Text Layout.
|
int |
getOffsetAtX(float x,
int[] trailing) |
float |
getPosX(int glyphIndex)
The x position for the given glyphIndex relative the GlyphList.
|
float |
getPosY(int glyphIndex)
The y position for the given glyphIndex relative the GlyphList.
|
int |
getScript() |
int |
getSlot() |
int |
getStart() |
TextSpan |
getTextSpan()
Used during layout children (for rich text)
can be null (for non-rich text) but never null for rich text.
|
float |
getWidth()
Returns the width of the GlyphList
|
int |
getWrapIndex(float width) |
float |
getXAtOffset(int offset,
boolean leading) |
boolean |
isBreak() |
boolean |
isCanonical() |
boolean |
isComplex()
Means that this GlyphList was shaped using complex processing (ICU),
either because it is complex script or because font features were
requested.
|
boolean |
isEmbedded() |
boolean |
isLeftBearing() |
boolean |
isLeftToRight() |
boolean |
isLinebreak() |
boolean |
isNoLinkAfter() |
boolean |
isNoLinkBefore() |
boolean |
isRightBearing() |
boolean |
isSoftbreak() |
boolean |
isSplit() |
boolean |
isSplitLast() |
boolean |
isTab() |
void |
justify(int offset,
float width) |
void |
merge(TextRun run) |
private void |
reset() |
void |
setComplex(boolean complex) |
void |
setEmbedded(RectBounds bounds,
int length) |
void |
setLeftBearing() |
void |
setLine(TextLine line) |
void |
setLinebreak() |
void |
setLocation(float x,
float y) |
void |
setMetrics(float ascent,
float descent,
float leading) |
void |
setRightBearing() |
void |
setSoftbreak() |
void |
setTab() |
void |
setWidth(float width) |
void |
shape(int count,
int[] glyphs,
float[] pos) |
void |
shape(int count,
int[] glyphs,
float[] pos,
int[] indices) |
TextRun |
split(int offset) |
java.lang.String |
toString() |
TextRun |
unwrap() |
int glyphCount
int[] gids
float[] positions
int[] charIndices
int start
int length
float width
byte level
int script
TextSpan span
TextLine line
Point2D location
private float ascent
private float descent
private float leading
int flags
int slot
static final int FLAGS_TAB
static final int FLAGS_LINEBREAK
static final int FLAGS_SOFTBREAK
static final int FLAGS_NO_LINK_BEFORE
static final int FLAGS_NO_LINK_AFTER
static final int FLAGS_COMPLEX
static final int FLAGS_EMBEDDED
static final int FLAGS_SPLIT
static final int FLAGS_SPLIT_LAST
static final int FLAGS_LEFT_BEARING
static final int FLAGS_RIGHT_BEARING
static final int FLAGS_CANONICAL
static final int FLAGS_COMPACT
float cacheWidth
int cacheIndex
public TextRun(int start, int length, byte level, boolean complex, int script, TextSpan span, int slot, boolean canonical)
public int getStart()
public int getEnd()
public int getLength()
public byte getLevel()
public RectBounds getLineBounds()
GlyphList
getLineBounds
in interface GlyphList
public void setLine(TextLine line)
public int getScript()
public TextSpan getTextSpan()
GlyphList
getTextSpan
in interface GlyphList
public int getSlot()
public boolean isLinebreak()
public boolean isCanonical()
public boolean isSoftbreak()
public boolean isBreak()
public boolean isTab()
public boolean isEmbedded()
public boolean isNoLinkBefore()
public boolean isNoLinkAfter()
public boolean isSplit()
public boolean isSplitLast()
public boolean isComplex()
GlyphList
public boolean isLeftBearing()
public boolean isRightBearing()
public boolean isLeftToRight()
public void setComplex(boolean complex)
public float getWidth()
GlyphList
public float getHeight()
GlyphList
public void setWidth(float width)
public void setMetrics(float ascent, float descent, float leading)
public float getAscent()
public float getDescent()
public float getLeading()
public void setLocation(float x, float y)
public Point2D getLocation()
GlyphList
getLocation
in interface GlyphList
public void setTab()
public void setEmbedded(RectBounds bounds, int length)
public void setLinebreak()
public void setSoftbreak()
public void setLeftBearing()
public void setRightBearing()
public int getWrapIndex(float width)
public int getGlyphCount()
GlyphList
getGlyphCount
in interface GlyphList
public int getGlyphCode(int glyphIndex)
GlyphList
getGlyphCode
in interface GlyphList
public float getPosX(int glyphIndex)
GlyphList
public float getPosY(int glyphIndex)
GlyphList
public float getAdvance(int glyphIndex)
public void shape(int count, int[] glyphs, float[] pos, int[] indices)
public void shape(int count, int[] glyphs, float[] pos)
public float getXAtOffset(int offset, boolean leading)
public int getGlyphAtX(float x, int[] trailing)
public int getOffsetAtX(float x, int[] trailing)
private void reset()
public TextRun split(int offset)
public void merge(TextRun run)
public TextRun unwrap()
public void justify(int offset, float width)
public int getGlyphIndex(int charOffset)
public int getCharOffset(int glyphIndex)
GlyphList
getCharOffset
in interface GlyphList
public java.lang.String toString()
toString
in class java.lang.Object