org.apache.batik.extension.svg

Class GlyphIterator

public class GlyphIterator extends Object

Field Summary
static AttributeFLOW_LINE_BREAK
static AttributeGVT_FONT
static AttributePREFORMATTED
static charSOFT_HYPHEN
static AttributeTEXT_COMPOUND_ID
static charZERO_WIDTH_JOINER
static charZERO_WIDTH_SPACE
Constructor Summary
GlyphIterator(AttributedCharacterIterator aci, GVTGlyphVector gv)
GlyphIterator(GlyphIterator gi)
Method Summary
protected voidaddLeftShift(int idx, float chAdv)
GlyphIteratorcopy()
GlyphIteratorcopy(GlyphIterator gi)
booleandone()
intgetACIIndex()
floatgetAdj()
floatgetAdv()
chargetChar()
floatgetCharAdvance()
Get the advance associated with the current glyph
protected floatgetCharAdvance(int gvIdx)
Get the advance associated with any glyph
floatgetCharWidth()
Get the visual advance associated with the current glyph.
protected floatgetCharWidth(int gvIdx)
Get the visual advance associated with the current glyph.
intgetGlyphIndex()
intgetLineBreaks()
floatgetMaxAscent()
floatgetMaxDescent()
floatgetMaxFontSize()
Point2DgetOrigin()
booleanisBreakChar()
booleanisLastChar()
protected booleanisPrinting(char tstCH)
booleanisPrinting()
LineInfonewLine(Float loc, float lineWidth, boolean partial, Float verticalAlignOffset)
voidnextChar()
Move iterator to the next char.
protected voidupdateLineMetrics(int end)

Field Detail

FLOW_LINE_BREAK

public static final Attribute FLOW_LINE_BREAK

GVT_FONT

public static final Attribute GVT_FONT

PREFORMATTED

public static final Attribute PREFORMATTED

SOFT_HYPHEN

public static final char SOFT_HYPHEN

TEXT_COMPOUND_ID

public static final Attribute TEXT_COMPOUND_ID

ZERO_WIDTH_JOINER

public static final char ZERO_WIDTH_JOINER

ZERO_WIDTH_SPACE

public static final char ZERO_WIDTH_SPACE

Constructor Detail

GlyphIterator

public GlyphIterator(AttributedCharacterIterator aci, GVTGlyphVector gv)

GlyphIterator

public GlyphIterator(GlyphIterator gi)

Method Detail

addLeftShift

protected void addLeftShift(int idx, float chAdv)

copy

public GlyphIterator copy()

copy

public GlyphIterator copy(GlyphIterator gi)

done

public boolean done()

getACIIndex

public int getACIIndex()

Returns: The index into Attributed Character iterator for current character.

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.

getAdv

public float getAdv()

Returns: The current advance for the line, this is the 'visual width' of the current line.

getChar

public char getChar()

Returns: the current character.

getCharAdvance

public float getCharAdvance()
Get the advance associated with the current glyph

getCharAdvance

protected float getCharAdvance(int gvIdx)
Get the advance associated with any 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.

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.

getGlyphIndex

public int getGlyphIndex()

Returns: The index into glyph vector for current character.

getLineBreaks

public int getLineBreaks()

getMaxAscent

public float getMaxAscent()

getMaxDescent

public float getMaxDescent()

getMaxFontSize

public float getMaxFontSize()

getOrigin

public Point2D getOrigin()

Returns: The origin of the glyph vector (the point all glyphs are layed out with respect to).

isBreakChar

public boolean isBreakChar()

isLastChar

public boolean isLastChar()

isPrinting

protected boolean isPrinting(char tstCH)

isPrinting

public boolean isPrinting()

newLine

public LineInfo newLine(Float loc, float lineWidth, boolean partial, Float verticalAlignOffset)

nextChar

public void nextChar()
Move iterator to the next char.

updateLineMetrics

protected void updateLineMetrics(int end)
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.