|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Graphics | +--java.awt.Graphics2D | +--org.apache.batik.ext.awt.g2d.AbstractGraphics2D | +--org.apache.fop.svg.PDFGraphics2D | +--org.apache.fop.svg.PDFDocumentGraphics2D
This class is a wrapper for the PDFGraphics2D that is used to create a full document around the pdf rendering from PDFGraphics2D.
PDFGraphics2D
Fields inherited from class org.apache.fop.svg.PDFGraphics2D |
currentFontName, currentFontSize, currentXPosition, currentYPosition, fontState, ovFontState, pdfDoc |
Fields inherited from class org.apache.batik.ext.awt.g2d.AbstractGraphics2D |
gc, textAsShapes |
Constructor Summary | |
PDFDocumentGraphics2D(boolean textAsShapes,
java.io.OutputStream stream,
int width,
int height)
Create a new PDFDocumentGraphics2D. |
|
PDFDocumentGraphics2D(PDFDocumentGraphics2D g)
This constructor supports the create method |
Method Summary | |
java.awt.Graphics |
create()
Creates a new Graphics object that is
a copy of this Graphics object. |
void |
drawString(java.lang.String s,
float x,
float y)
Renders the text specified by the specified String ,
using the current Font and Paint attributes
in the Graphics2D context.
|
void |
finish()
The rendering process has finished. |
FontState |
getFontState()
|
PDFDocument |
getPDFDocument()
|
void |
setBackgroundColor(java.awt.Color col)
Set the background of the pdf document. |
void |
setGraphicContext(org.apache.batik.ext.awt.g2d.GraphicContext c)
|
void |
setSVGDimension(float w,
float h)
Set the dimensions of the svg document that will be drawn. |
Methods inherited from class org.apache.fop.svg.PDFGraphics2D |
addJpegImage, addLink, applyColor, applyPaint, applyStroke, buildBufferedImage, copyArea, dispose, doDrawing, draw, drawImage, drawImage, drawRenderableImage, drawRenderedImage, drawString, fill, getAnnotList, getDeviceConfiguration, getFontMetrics, getString, setOverrideFontState, setXORMode, writeClip |
Methods inherited from class org.apache.batik.ext.awt.g2d.AbstractGraphics2D |
addRenderingHints, clearRect, clip, clipRect, drawArc, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, drawString, fillArc, fillOval, fillPolygon, fillRect, fillRoundRect, getBackground, getClip, getClipBounds, getColor, getComposite, getFont, getFontRenderContext, getPaint, getRenderingHint, getRenderingHints, getStroke, getTransform, hit, rotate, rotate, scale, setBackground, setClip, setClip, setColor, setComposite, setFont, setPaint, setPaintMode, setRenderingHint, setRenderingHints, setStroke, setTransform, shear, transform, translate, translate |
Methods inherited from class java.awt.Graphics2D |
draw3DRect, fill3DRect |
Methods inherited from class java.awt.Graphics |
create, drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClip, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PDFDocumentGraphics2D(boolean textAsShapes, java.io.OutputStream stream, int width, int height)
textAsShapes
- set this to true so that text will be rendered
using curves and not the font.stream
- the stream that the final document should be written to.width
- the width of the documentheight
- the height of the documentpublic PDFDocumentGraphics2D(PDFDocumentGraphics2D g)
Method Detail |
public FontState getFontState()
public PDFDocument getPDFDocument()
public void setSVGDimension(float w, float h)
public void setBackgroundColor(java.awt.Color col)
public void finish() throws java.io.IOException
public void setGraphicContext(org.apache.batik.ext.awt.g2d.GraphicContext c)
setGraphicContext
in class PDFGraphics2D
public java.awt.Graphics create()
Graphics
object that is
a copy of this Graphics
object.create
in class PDFGraphics2D
public void drawString(java.lang.String s, float x, float y)
PDFGraphics2D
String
,
using the current Font
and Paint
attributes
in the Graphics2D
context.
The baseline of the first character is at position
(x, y) in the User Space.
The rendering attributes applied include the Clip
,
Transform
, Paint
, Font
and
Composite
attributes. For characters in script systems
such as Hebrew and Arabic, the glyphs can be rendered from right to
left, in which case the coordinate supplied is the location of the
leftmost character on the baseline.drawString
in class PDFGraphics2D
org.apache.fop.svg.PDFGraphics2D
s
- the String
to be renderedx, y
- the coordinates where the String
should be renderedAbstractGraphics2D.setPaint(java.awt.Paint)
,
Graphics.setColor(java.awt.Color)
,
Graphics.setFont(java.awt.Font)
,
AbstractGraphics2D.setTransform(java.awt.geom.AffineTransform)
,
AbstractGraphics2D.setComposite(java.awt.Composite)
,
AbstractGraphics2D.setClip(int, int, int, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |