|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Graphics
java.awt.Graphics2D
org.apache.xmlgraphics.java2d.AbstractGraphics2D
org.apache.fop.afp.AFPGraphics2D
This is a concrete implementation of AbstractGraphics2D
(and
therefore of Graphics2D
) which is able to generate GOCA byte
codes.
AbstractGraphics2D
Field Summary | |
protected org.apache.xmlgraphics.java2d.TextHandler |
customTextHandler
Custom text handler |
protected org.apache.xmlgraphics.java2d.TextHandler |
fallbackTextHandler
Fallback text handler |
Fields inherited from class org.apache.xmlgraphics.java2d.AbstractGraphics2D |
gc, inPossibleRecursion, textAsShapes |
Constructor Summary | |
AFPGraphics2D(AFPGraphics2D g2d)
Copy Constructor |
|
AFPGraphics2D(boolean textAsShapes,
AFPPaintingState paintingState,
AFPResourceManager resourceManager,
AFPResourceInfo resourceInfo,
FontInfo fontInfo)
Main constructor |
Method Summary | |
void |
addNativeImage(org.apache.xmlgraphics.image.loader.Image image,
float x,
float y,
float width,
float height)
Add a natively handled image directly to the document. This is used by the ImageElementBridge to draw a natively handled image (like JPEG or CCITT images) directly into the document rather than converting the image into a bitmap and increasing the size. |
protected void |
applyStroke(java.awt.Stroke stroke)
Apply the stroke to the AFP graphics object. |
double |
convertToAbsoluteLength(double length)
Converts a length value to an absolute value. |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
|
java.awt.Graphics |
create()
|
void |
dispose()
|
void |
draw(java.awt.Shape shape)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
|
void |
drawRenderableImage(java.awt.image.renderable.RenderableImage img,
java.awt.geom.AffineTransform xform)
|
void |
drawRenderedImage(java.awt.image.RenderedImage img,
java.awt.geom.AffineTransform xform)
|
void |
drawString(java.lang.String str,
float x,
float y)
|
void |
fill(java.awt.Shape shape)
|
java.awt.GraphicsConfiguration |
getDeviceConfiguration()
|
FontInfo |
getFontInfo()
Returns the FontInfo |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
|
GraphicsObject |
getGraphicsObject()
Returns the GOCA graphics object |
AFPPaintingState |
getPaintingState()
Returns the AFP painting state |
void |
handleIOException(java.io.IOException ioe)
Central handler for IOExceptions for this class. |
void |
setCustomTextHandler(org.apache.xmlgraphics.java2d.TextHandler handler)
Sets a custom TextHandler implementation that is responsible for painting text. |
void |
setGraphicContext(org.apache.xmlgraphics.java2d.GraphicContext gc)
Sets the GraphicContext |
void |
setGraphicsObject(GraphicsObject obj)
Sets the GOCA graphics object |
void |
setXORMode(java.awt.Color col)
|
Methods inherited from class org.apache.xmlgraphics.java2d.AbstractGraphics2D |
addRenderingHints, clearRect, clip, clipRect, drawArc, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, drawString, drawString, fillArc, fillOval, fillPolygon, fillRect, fillRoundRect, getBackground, getClip, getClipBounds, getColor, getComposite, getFont, getFontRenderContext, getGraphicContext, 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 |
Field Detail |
protected org.apache.xmlgraphics.java2d.TextHandler fallbackTextHandler
protected org.apache.xmlgraphics.java2d.TextHandler customTextHandler
Constructor Detail |
public AFPGraphics2D(boolean textAsShapes, AFPPaintingState paintingState, AFPResourceManager resourceManager, AFPResourceInfo resourceInfo, FontInfo fontInfo)
textAsShapes
- if true, all text is turned into shapes in the convertion. No
text is output.paintingState
- painting stateresourceManager
- resource managerresourceInfo
- resource infofontInfo
- font infopublic AFPGraphics2D(AFPGraphics2D g2d)
g2d
- a AFPGraphics2D whose properties should be copiedMethod Detail |
public GraphicsObject getGraphicsObject()
public void setGraphicsObject(GraphicsObject obj)
obj
- the GOCA graphics objectpublic AFPPaintingState getPaintingState()
public FontInfo getFontInfo()
public void setGraphicContext(org.apache.xmlgraphics.java2d.GraphicContext gc)
gc
- GraphicContext to usepublic double convertToAbsoluteLength(double length)
length
- the length
protected void applyStroke(java.awt.Stroke stroke)
stroke
- the java strokepublic void draw(java.awt.Shape shape)
public void fill(java.awt.Shape shape)
public void handleIOException(java.io.IOException ioe)
ioe
- IOException to handlepublic void drawString(java.lang.String str, float x, float y)
public java.awt.GraphicsConfiguration getDeviceConfiguration()
public java.awt.Graphics create()
public void dispose()
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
public void drawRenderedImage(java.awt.image.RenderedImage img, java.awt.geom.AffineTransform xform)
public void setCustomTextHandler(org.apache.xmlgraphics.java2d.TextHandler handler)
handler
- the custom TextHandler implementationpublic void drawRenderableImage(java.awt.image.renderable.RenderableImage img, java.awt.geom.AffineTransform xform)
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
public void setXORMode(java.awt.Color col)
public void addNativeImage(org.apache.xmlgraphics.image.loader.Image image, float x, float y, float width, float height)
addNativeImage
in interface NativeImageHandler
image
- the image to drawx
- the x positiony
- the y positionwidth
- the width to draw the imageheight
- the height to draw the imagepublic void copyArea(int x, int y, int width, int height, int dx, int dy)
|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |