|
|||||||||
| Home >> All >> org >> apache >> batik >> [ gvt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.batik.gvt
Interface TextPainter

- public interface TextPainter
Renders the attributed character iterator of a TextNode.
- Version:
- $Id: TextPainter.java,v 1.20 2005/03/27 08:58:34 cam Exp $
| Method Summary | |
java.awt.geom.Rectangle2D |
getBounds2D(TextNode node)
Get a Rectangle2D in userspace coords which encloses the textnode glyphs rendered bounds (includes stroke etc). |
java.awt.geom.Rectangle2D |
getGeometryBounds(TextNode node)
Get a Rectangle2D in userspace coords which encloses the textnode glyphs just including the geometry info. |
java.awt.Shape |
getHighlightShape(org.apache.batik.gvt.text.Mark beginMark,
org.apache.batik.gvt.text.Mark endMark)
Get a Shape in userspace coords which encloses the textnode glyphs bounded by two Marks. |
org.apache.batik.gvt.text.Mark |
getMark(TextNode node,
int index,
boolean beforeGlyph)
Returns a mark for the char at index in node's AttributedCharacterIterator. |
java.awt.Shape |
getOutline(TextNode node)
Get a Shape in userspace coords which defines the textnode glyph outlines. |
int[] |
getSelected(org.apache.batik.gvt.text.Mark start,
org.apache.batik.gvt.text.Mark finish)
Get an array of index pairs corresponding to the indices within an AttributedCharacterIterator regions bounded by two Marks. |
void |
paint(TextNode node,
java.awt.Graphics2D g2d)
Paints the specified attributed character iterator using the specified Graphics2D and context and font context. |
org.apache.batik.gvt.text.Mark |
selectAt(double x,
double y,
TextNode node)
Initiates a text selection on a particular AttributedCharacterIterator, using the text/font metrics employed by this TextPainter instance. |
org.apache.batik.gvt.text.Mark |
selectFirst(TextNode node)
Selects the first glyph in the text node. |
org.apache.batik.gvt.text.Mark |
selectLast(TextNode node)
Selects the last glyph in the text node. |
org.apache.batik.gvt.text.Mark |
selectTo(double x,
double y,
org.apache.batik.gvt.text.Mark beginMark)
Continues a text selection on a particular AttributedCharacterIterator, using the text/font metrics employed by this TextPainter instance. |
| Method Detail |
paint
public void paint(TextNode node, java.awt.Graphics2D g2d)
- Paints the specified attributed character iterator using the specified
Graphics2D and context and font context.
selectAt
public org.apache.batik.gvt.text.Mark selectAt(double x, double y, TextNode node)
- Initiates a text selection on a particular AttributedCharacterIterator,
using the text/font metrics employed by this TextPainter instance.
selectTo
public org.apache.batik.gvt.text.Mark selectTo(double x, double y, org.apache.batik.gvt.text.Mark beginMark)
- Continues a text selection on a particular AttributedCharacterIterator,
using the text/font metrics employed by this TextPainter instance.
selectFirst
public org.apache.batik.gvt.text.Mark selectFirst(TextNode node)
- Selects the first glyph in the text node.
selectLast
public org.apache.batik.gvt.text.Mark selectLast(TextNode node)
- Selects the last glyph in the text node.
getMark
public org.apache.batik.gvt.text.Mark getMark(TextNode node, int index, boolean beforeGlyph)
- Returns a mark for the char at index in node's
AttributedCharacterIterator. Leading edge indicates if the
mark should be considered immediately 'before' glyph or
after
getSelected
public int[] getSelected(org.apache.batik.gvt.text.Mark start, org.apache.batik.gvt.text.Mark finish)
- Get an array of index pairs corresponding to the indices within an
AttributedCharacterIterator regions bounded by two Marks.
Note that the instances of Mark passed to this function must
come from the same TextPainter that generated them via selectAt()
and selectTo(), since the TextPainter implementation may rely on hidden
implementation details of its own Mark implementation.
getHighlightShape
public java.awt.Shape getHighlightShape(org.apache.batik.gvt.text.Mark beginMark, org.apache.batik.gvt.text.Mark endMark)
- Get a Shape in userspace coords which encloses the textnode
glyphs bounded by two Marks.
Note that the instances of Mark passed to this function
must come
from the same TextPainter that generated them via selectAt() and
selectTo(), since the TextPainter implementation may rely on hidden
implementation details of its own Mark implementation.
getOutline
public java.awt.Shape getOutline(TextNode node)
- Get a Shape in userspace coords which defines the textnode
glyph outlines.
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D(TextNode node)
- Get a Rectangle2D in userspace coords which encloses the textnode
glyphs rendered bounds (includes stroke etc).
getGeometryBounds
public java.awt.geom.Rectangle2D getGeometryBounds(TextNode node)
- Get a Rectangle2D in userspace coords which encloses the textnode
glyphs just including the geometry info.
|
|||||||||
| Home >> All >> org >> apache >> batik >> [ gvt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC