|
fop 2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.svg.AbstractFOPTextPainter
public abstract class AbstractFOPTextPainter
Renders the attributed character iterator of a TextNode
.
This class draws the text directly into the Graphics2D so that
the text is not drawn using shapes.
If the text is simple enough to draw then it sets the font and calls
drawString. If the text is complex or the cannot be translated
into a simple drawString the StrokingTextPainter is used instead.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
the logger for this class |
Constructor Summary | |
---|---|
AbstractFOPTextPainter(FOPTextHandler nativeTextHandler,
org.apache.batik.bridge.TextPainter proxyTextPainter)
Create a new PS text painter with the given font information. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds2D(org.apache.batik.bridge.TextNode node)
Get the bounds. |
java.awt.geom.Rectangle2D |
getGeometryBounds(org.apache.batik.bridge.TextNode node)
Get the geometry bounds. |
java.awt.Shape |
getHighlightShape(org.apache.batik.bridge.Mark beginMark,
org.apache.batik.bridge.Mark endMark)
Get the highlighted shape. |
org.apache.batik.bridge.Mark |
getMark(org.apache.batik.bridge.TextNode node,
int pos,
boolean all)
Get the mark. |
java.awt.Shape |
getOutline(org.apache.batik.bridge.TextNode node)
Get the outline shape of the text characters. |
int[] |
getSelected(org.apache.batik.bridge.Mark start,
org.apache.batik.bridge.Mark finish)
Get selected. |
protected java.lang.String |
getText(java.text.AttributedCharacterIterator aci)
Extract the raw text from an ACI. |
protected abstract boolean |
isSupportedGraphics2D(java.awt.Graphics2D g2d)
Checks whether the Graphics2D is compatible with this text painter. |
void |
paint(org.apache.batik.bridge.TextNode node,
java.awt.Graphics2D g2d)
Paints the specified attributed character iterator using the specified Graphics2D and context and font context. |
org.apache.batik.bridge.Mark |
selectAt(double x,
double y,
org.apache.batik.bridge.TextNode node)
Select at. |
org.apache.batik.bridge.Mark |
selectFirst(org.apache.batik.bridge.TextNode node)
Selec first. |
org.apache.batik.bridge.Mark |
selectLast(org.apache.batik.bridge.TextNode node)
Select last. |
org.apache.batik.bridge.Mark |
selectTo(double x,
double y,
org.apache.batik.bridge.Mark beginMark)
Select to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public AbstractFOPTextPainter(FOPTextHandler nativeTextHandler, org.apache.batik.bridge.TextPainter proxyTextPainter)
nativeTextHandler
- the NativeTextHandler instance used for text paintingMethod Detail |
---|
public void paint(org.apache.batik.bridge.TextNode node, java.awt.Graphics2D g2d)
paint
in interface org.apache.batik.bridge.TextPainter
node
- the TextNode to paintg2d
- the Graphics2D to useprotected abstract boolean isSupportedGraphics2D(java.awt.Graphics2D g2d)
g2d
- the Graphics2D instance to check
protected java.lang.String getText(java.text.AttributedCharacterIterator aci)
aci
- ACI to inspect
public java.awt.Shape getOutline(org.apache.batik.bridge.TextNode node)
getOutline
in interface org.apache.batik.bridge.TextPainter
node
- the text node
public java.awt.geom.Rectangle2D getBounds2D(org.apache.batik.bridge.TextNode node)
getBounds2D
in interface org.apache.batik.bridge.TextPainter
node
- the text node
public java.awt.geom.Rectangle2D getGeometryBounds(org.apache.batik.bridge.TextNode node)
getGeometryBounds
in interface org.apache.batik.bridge.TextPainter
node
- the text node
public org.apache.batik.bridge.Mark getMark(org.apache.batik.bridge.TextNode node, int pos, boolean all)
getMark
in interface org.apache.batik.bridge.TextPainter
node
- the text nodepos
- the positionall
- select all
public org.apache.batik.bridge.Mark selectAt(double x, double y, org.apache.batik.bridge.TextNode node)
selectAt
in interface org.apache.batik.bridge.TextPainter
x
- the x positiony
- the y positionnode
- the text node
public org.apache.batik.bridge.Mark selectTo(double x, double y, org.apache.batik.bridge.Mark beginMark)
selectTo
in interface org.apache.batik.bridge.TextPainter
x
- the x positiony
- the y positionbeginMark
- the start mark
public org.apache.batik.bridge.Mark selectFirst(org.apache.batik.bridge.TextNode node)
selectFirst
in interface org.apache.batik.bridge.TextPainter
node
- the text node
public org.apache.batik.bridge.Mark selectLast(org.apache.batik.bridge.TextNode node)
selectLast
in interface org.apache.batik.bridge.TextPainter
node
- the text node
public int[] getSelected(org.apache.batik.bridge.Mark start, org.apache.batik.bridge.Mark finish)
getSelected
in interface org.apache.batik.bridge.TextPainter
start
- the start markfinish
- the finish mark
public java.awt.Shape getHighlightShape(org.apache.batik.bridge.Mark beginMark, org.apache.batik.bridge.Mark endMark)
getHighlightShape
in interface org.apache.batik.bridge.TextPainter
beginMark
- the start markendMark
- the end mark
|
fop 2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |