Package org.apache.batik.bridge
Class BasicTextPainter
java.lang.Object
org.apache.batik.bridge.BasicTextPainter
- All Implemented Interfaces:
TextPainter
- Direct Known Subclasses:
ConcreteTextPainter
,StrokingTextPainter
Basic implementation of TextPainter which
renders the attributed character iterator of a
TextNode
.
Suitable for use with "standard" java.awt.font.TextAttributes only.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
This TextPainter's implementation of the Mark interface. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FontRenderContext
protected FontRenderContext
The font render context to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGeometryBounds
(TextNode node) Get a Rectangle2D in userspace coords which encloses the textnode glyphs just including the geometry info.protected TextLayoutFactory
protected abstract Mark
Returns the mark for the specified parameters.Given an X, y coordinate, AttributedCharacterIterator, return a Mark which encapsulates a "selection start" action.Given an X, y coordinate, starting Mark, AttributedCharacterIterator, return a Mark which encapsulates a "selection continued" action.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.batik.bridge.TextPainter
getBounds2D, getHighlightShape, getMark, getOutline, getSelected, paint, selectFirst, selectLast
-
Field Details
-
fontRenderContext
The font render context to use. -
aaOffFontRenderContext
-
-
Constructor Details
-
BasicTextPainter
public BasicTextPainter()
-
-
Method Details
-
getTextLayoutFactory
-
selectAt
Given an X, y coordinate, AttributedCharacterIterator, return a Mark which encapsulates a "selection start" action. The standard order of method calls for selection is: selectAt(); [selectTo(),...], selectTo(); getSelection().- Specified by:
selectAt
in interfaceTextPainter
-
selectTo
Given an X, y coordinate, starting Mark, AttributedCharacterIterator, return a Mark which encapsulates a "selection continued" action. The standard order of method calls for selection is: selectAt(); [selectTo(),...], selectTo(); getSelection().- Specified by:
selectTo
in interfaceTextPainter
-
getGeometryBounds
Get a Rectangle2D in userspace coords which encloses the textnode glyphs just including the geometry info.- Specified by:
getGeometryBounds
in interfaceTextPainter
- Parameters:
node
- the TextNode to measure
-
hitTest
Returns the mark for the specified parameters.
-