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) |
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) |
String |
toString() |
TextRun |
unwrap() |
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)
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
Copyright © 2020. All rights reserved.