Package org.apache.batik.extension.svg
Class GlyphIterator
java.lang.Object
org.apache.batik.extension.svg.GlyphIterator
- Version:
- $Id: GlyphIterator.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) AttributedCharacterIterator
(package private) int
(package private) float
(package private) float
(package private) char
(package private) int
(package private) int
static final AttributedCharacterIterator.Attribute
(package private) GVTFont
(package private) int
(package private) FontRenderContext
(package private) float[]
(package private) GVTGlyphVector
(package private) Point2D
static final AttributedCharacterIterator.Attribute
(package private) int
(package private) int
(package private) float[]
(package private) int[]
(package private) int
(package private) int
(package private) int
(package private) float
(package private) float
(package private) float
(package private) int
static final AttributedCharacterIterator.Attribute
(package private) int
static final char
static final AttributedCharacterIterator.Attribute
(package private) float
static final char
static final char
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addLeftShift
(int idx, float chAdv) copy()
copy
(GlyphIterator gi) boolean
done()
int
float
getAdj()
float
getAdv()
char
getChar()
float
Get the advance associated with the current glyphprotected float
getCharAdvance
(int gvIdx) Get the advance associated with any glyphfloat
Get the visual advance associated with the current glyph.protected float
getCharWidth
(int gvIdx) Get the visual advance associated with the current glyph.int
int
float
float
float
boolean
boolean
boolean
protected boolean
isPrinting
(char tstCH) newLine
(Point2D.Float loc, float lineWidth, boolean partial, Point2D.Float verticalAlignOffset) void
nextChar()
Move iterator to the next char.protected void
updateLineMetrics
(int end)
-
Field Details
-
PREFORMATTED
-
FLOW_LINE_BREAK
-
TEXT_COMPOUND_ID
-
GVT_FONT
-
SOFT_HYPHEN
public static final char SOFT_HYPHEN- See Also:
-
ZERO_WIDTH_SPACE
public static final char ZERO_WIDTH_SPACE- See Also:
-
ZERO_WIDTH_JOINER
public static final char ZERO_WIDTH_JOINER- See Also:
-
idx
int idx -
chIdx
int chIdx -
lineIdx
int lineIdx -
aciIdx
int aciIdx -
charCount
int charCount -
adv
float adv -
adj
float adj -
runLimit
int runLimit -
lineBreakRunLimit
int lineBreakRunLimit -
lineBreakCount
int lineBreakCount -
font
GVTFont font -
fontStart
int fontStart -
maxAscent
float maxAscent -
maxDescent
float maxDescent -
maxFontSize
float maxFontSize -
width
float width -
ch
char ch -
numGlyphs
int numGlyphs -
aci
-
gv
-
gp
float[] gp -
frc
-
leftShiftIdx
int[] leftShiftIdx -
leftShiftAmt
float[] leftShiftAmt -
leftShift
int leftShift -
gvBase
Point2D gvBase
-
-
Constructor Details
-
GlyphIterator
-
GlyphIterator
-
-
Method Details
-
copy
-
copy
-
getGlyphIndex
public int getGlyphIndex()- Returns:
- The index into glyph vector for current character.
-
getChar
public char getChar()- Returns:
- the current character.
-
getACIIndex
public int getACIIndex()- Returns:
- The index into Attributed Character iterator for current character.
-
getAdv
public float getAdv()- Returns:
- The current advance for the line, this is the 'visual width' of the current line.
-
getOrigin
- Returns:
- The origin of the glyph vector (the point all glyphs are layed out with respect to).
-
getAdj
public float getAdj()- Returns:
- The current adjustment for the line. This is the ammount that needs to be subracted from the following line to get it back to the start of the next line.
-
getMaxFontSize
public float getMaxFontSize() -
getMaxAscent
public float getMaxAscent() -
getMaxDescent
public float getMaxDescent() -
isLastChar
public boolean isLastChar() -
done
public boolean done() -
isBreakChar
public boolean isBreakChar() -
isPrinting
protected boolean isPrinting(char tstCH) -
getLineBreaks
public int getLineBreaks() -
nextChar
public void nextChar()Move iterator to the next char. -
addLeftShift
protected void addLeftShift(int idx, float chAdv) -
updateLineMetrics
protected void updateLineMetrics(int end) -
newLine
public LineInfo newLine(Point2D.Float loc, float lineWidth, boolean partial, Point2D.Float verticalAlignOffset) -
isPrinting
public boolean isPrinting() -
getCharAdvance
public float getCharAdvance()Get the advance associated with the current glyph -
getCharWidth
public float getCharWidth()Get the visual advance associated with the current glyph. This is the distance from the location of the glyph to the rightmost part of the glyph. -
getCharAdvance
protected float getCharAdvance(int gvIdx) Get the advance associated with any glyph -
getCharWidth
protected float getCharWidth(int gvIdx) Get the visual advance associated with the current glyph. This is the distance from the location of the glyph to the rightmost part of the glyph.
-