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 classThis TextPainter's implementation of the Mark interface. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FontRenderContextprotected FontRenderContextThe 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 TextLayoutFactoryprotected abstract MarkReturns 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
selectAtin 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:
selectToin interfaceTextPainter
-
getGeometryBounds
Get a Rectangle2D in userspace coords which encloses the textnode glyphs just including the geometry info.- Specified by:
getGeometryBoundsin interfaceTextPainter- Parameters:
node- the TextNode to measure
-
hitTest
-