|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.fop.svg.PDFTextPainter
Renders the attributed character iterator of a TextNode. This class draws the text directly into the PDFGraphics2D so that the text is not drawn using shapes which makes the PDF files larger. 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. (todo) handle underline, overline and strikethrough (todo) use drawString(AttributedCharacterIterator iterator...) for some
Field Summary | |
protected static org.apache.batik.gvt.TextPainter |
PROXY_PAINTER
Use the stroking text painter to get the bounds and shape. |
Constructor Summary | |
PDFTextPainter(FontInfo fi)
Create a new PDF text painter with the given font information. |
Method Summary | |
java.awt.geom.Rectangle2D |
getBounds2D(org.apache.batik.gvt.TextNode node)
Get the bounds. |
java.awt.geom.Rectangle2D |
getGeometryBounds(org.apache.batik.gvt.TextNode node)
Get the geometry bounds. |
java.awt.Shape |
getHighlightShape(org.apache.batik.gvt.text.Mark beginMark,
org.apache.batik.gvt.text.Mark endMark)
Get the highlighted shape. |
org.apache.batik.gvt.text.Mark |
getMark(org.apache.batik.gvt.TextNode node,
int pos,
boolean all)
Get the mark. |
java.awt.Shape |
getOutline(org.apache.batik.gvt.TextNode node)
Get the outline shape of the text characters. |
int[] |
getSelected(org.apache.batik.gvt.text.Mark start,
org.apache.batik.gvt.text.Mark finish)
Get selected. |
void |
paint(org.apache.batik.gvt.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,
org.apache.batik.gvt.TextNode node)
Select at. |
org.apache.batik.gvt.text.Mark |
selectFirst(org.apache.batik.gvt.TextNode node)
Selec first. |
org.apache.batik.gvt.text.Mark |
selectLast(org.apache.batik.gvt.TextNode node)
Select last. |
org.apache.batik.gvt.text.Mark |
selectTo(double x,
double y,
org.apache.batik.gvt.text.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 static final org.apache.batik.gvt.TextPainter PROXY_PAINTER
Constructor Detail |
public PDFTextPainter(FontInfo fi)
fi
- the fint infoMethod Detail |
public void paint(org.apache.batik.gvt.TextNode node, java.awt.Graphics2D g2d)
paint
in interface org.apache.batik.gvt.TextPainter
node
- the TextNode to paintg2d
- the Graphics2D to usepublic java.awt.Shape getOutline(org.apache.batik.gvt.TextNode node)
getOutline
in interface org.apache.batik.gvt.TextPainter
node
- the text node
public java.awt.geom.Rectangle2D getBounds2D(org.apache.batik.gvt.TextNode node)
getBounds2D
in interface org.apache.batik.gvt.TextPainter
node
- the text node
public java.awt.geom.Rectangle2D getGeometryBounds(org.apache.batik.gvt.TextNode node)
getGeometryBounds
in interface org.apache.batik.gvt.TextPainter
node
- the text node
public org.apache.batik.gvt.text.Mark getMark(org.apache.batik.gvt.TextNode node, int pos, boolean all)
getMark
in interface org.apache.batik.gvt.TextPainter
node
- the text nodepos
- the positionall
- select all
public org.apache.batik.gvt.text.Mark selectAt(double x, double y, org.apache.batik.gvt.TextNode node)
selectAt
in interface org.apache.batik.gvt.TextPainter
x
- the x positiony
- the y positionnode
- the text node
public org.apache.batik.gvt.text.Mark selectTo(double x, double y, org.apache.batik.gvt.text.Mark beginMark)
selectTo
in interface org.apache.batik.gvt.TextPainter
x
- the x positiony
- the y positionbeginMark
- the start mark
public org.apache.batik.gvt.text.Mark selectFirst(org.apache.batik.gvt.TextNode node)
selectFirst
in interface org.apache.batik.gvt.TextPainter
node
- the text node
public org.apache.batik.gvt.text.Mark selectLast(org.apache.batik.gvt.TextNode node)
selectLast
in interface org.apache.batik.gvt.TextPainter
node
- the text node
public int[] getSelected(org.apache.batik.gvt.text.Mark start, org.apache.batik.gvt.text.Mark finish)
getSelected
in interface org.apache.batik.gvt.TextPainter
start
- the start markfinish
- the finish mark
public java.awt.Shape getHighlightShape(org.apache.batik.gvt.text.Mark beginMark, org.apache.batik.gvt.text.Mark endMark)
getHighlightShape
in interface org.apache.batik.gvt.TextPainter
beginMark
- the start markendMark
- the end mark
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |