public interface TextPainter
TextNode
.Modifier and Type | Method and Description |
---|---|
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(Mark beginMark,
Mark endMark)
Get a Shape in userspace coords which encloses the textnode
glyphs bounded by two Marks.
|
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(Mark start,
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.
|
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.
|
Mark |
selectFirst(TextNode node)
Selects the first glyph in the text node.
|
Mark |
selectLast(TextNode node)
Selects the last glyph in the text node.
|
Mark |
selectTo(double x,
double y,
Mark beginMark)
Continues a text selection on a particular AttributedCharacterIterator,
using the text/font metrics employed by this TextPainter instance.
|
void paint(TextNode node, java.awt.Graphics2D g2d)
node
- the TextNode to paintg2d
- the Graphics2D to useMark selectAt(double x, double y, TextNode node)
Mark selectTo(double x, double y, Mark beginMark)
Mark getMark(TextNode node, int index, boolean beforeGlyph)
int[] getSelected(Mark start, Mark finish)
java.awt.Shape getHighlightShape(Mark beginMark, Mark endMark)
java.awt.Shape getOutline(TextNode node)
node
- the TextNode to measurejava.awt.geom.Rectangle2D getBounds2D(TextNode node)
node
- the TextNode to measurejava.awt.geom.Rectangle2D getGeometryBounds(TextNode node)
node
- the TextNode to measureCopyright © 2022 Apache Software Foundation. All Rights Reserved.