org.apache.fop.render.pcl
Class PCLGraphics2D
java.lang.Object
|
+--java.awt.Graphics
|
+--java.awt.Graphics2D
|
+--org.apache.xmlgraphics.java2d.AbstractGraphics2D
|
+--org.apache.fop.render.pcl.PCLGraphics2D
- All Implemented Interfaces:
- java.lang.Cloneable
- public class PCLGraphics2D
- extends org.apache.xmlgraphics.java2d.AbstractGraphics2D
Graphics2D implementation implementing PCL and HP GL/2.
Note: This class cannot be used stand-alone to create full PCL documents.
Fields inherited from class org.apache.xmlgraphics.java2d.AbstractGraphics2D |
gc, inPossibleRecursion, textAsShapes |
Method Summary |
protected void |
applyPaint(java.awt.Paint paint)
Applies a new Paint object. |
protected void |
applyStroke(java.awt.Stroke stroke)
Applies a new Stroke object. |
protected java.awt.image.BufferedImage |
buildBufferedImage(java.awt.Dimension size)
Creates a buffered image. |
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 s)
|
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.text.AttributedCharacterIterator iterator,
float x,
float y)
|
void |
drawString(java.lang.String s,
float x,
float y)
|
void |
fill(java.awt.Shape s)
|
java.awt.GraphicsConfiguration |
getDeviceConfiguration()
|
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
|
void |
handleIOException(java.io.IOException ioe)
Central handler for IOExceptions for this class. |
protected void |
handleUnsupportedFeature(java.lang.String msg)
Raises an UnsupportedOperationException if this instance is configured to do so and an
unsupported feature has been requested. |
void |
processPathIteratorFill(java.awt.geom.PathIterator iter)
Processes a path iterator generating the nexessary painting operations. |
void |
processPathIteratorStroke(java.awt.geom.PathIterator iter)
Processes a path iterator generating the nexessary painting operations. |
void |
setClippingDisabled(boolean value)
Allows to disable all clipping operations. |
void |
setGraphicContext(org.apache.xmlgraphics.java2d.GraphicContext c)
Sets the GraphicContext |
void |
setXORMode(java.awt.Color c1)
|
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, 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 |
gen
protected PCLGenerator gen
- The PCL generator
PCLGraphics2D
public PCLGraphics2D(PCLGenerator gen)
- Create a new PCLGraphics2D.
- Parameters:
gen
- the PCL Generator to paint with
PCLGraphics2D
public PCLGraphics2D(PCLGraphics2D g)
- Copy constructor
- Parameters:
g
- parent PCLGraphics2D
create
public java.awt.Graphics create()
- Overrides:
create
in class java.awt.Graphics
- See Also:
Graphics.create()
dispose
public void dispose()
- Overrides:
dispose
in class java.awt.Graphics
- See Also:
Graphics.dispose()
setGraphicContext
public void setGraphicContext(org.apache.xmlgraphics.java2d.GraphicContext c)
- Sets the GraphicContext
- Parameters:
c
- GraphicContext to use
setClippingDisabled
public void setClippingDisabled(boolean value)
- Allows to disable all clipping operations.
- Parameters:
value
- true if clipping should be disabled.
handleIOException
public void handleIOException(java.io.IOException ioe)
- Central handler for IOExceptions for this class.
- Parameters:
ioe
- IOException to handle
handleUnsupportedFeature
protected void handleUnsupportedFeature(java.lang.String msg)
- Raises an UnsupportedOperationException if this instance is configured to do so and an
unsupported feature has been requested. Clients can make use of this to fall back to
a more compatible way of painting a PCL graphic.
- Parameters:
msg
- the error message to be displayed
getDeviceConfiguration
public java.awt.GraphicsConfiguration getDeviceConfiguration()
- Overrides:
getDeviceConfiguration
in class java.awt.Graphics2D
- See Also:
Graphics2D.getDeviceConfiguration()
applyStroke
protected void applyStroke(java.awt.Stroke stroke)
throws java.io.IOException
- Applies a new Stroke object.
- Parameters:
stroke
- Stroke object to use- Throws:
java.io.IOException
- In case of an I/O problem
applyPaint
protected void applyPaint(java.awt.Paint paint)
throws java.io.IOException
- Applies a new Paint object.
- Parameters:
paint
- Paint object to use- Throws:
java.io.IOException
- In case of an I/O problem
draw
public void draw(java.awt.Shape s)
- Overrides:
draw
in class java.awt.Graphics2D
- See Also:
Graphics2D.draw(java.awt.Shape)
fill
public void fill(java.awt.Shape s)
- Overrides:
fill
in class java.awt.Graphics2D
- See Also:
Graphics2D.fill(java.awt.Shape)
processPathIteratorStroke
public void processPathIteratorStroke(java.awt.geom.PathIterator iter)
throws java.io.IOException
- Processes a path iterator generating the nexessary painting operations.
- Parameters:
iter
- PathIterator to process- Throws:
java.io.IOException
- In case of an I/O problem.
processPathIteratorFill
public void processPathIteratorFill(java.awt.geom.PathIterator iter)
throws java.io.IOException
- Processes a path iterator generating the nexessary painting operations.
- Parameters:
iter
- PathIterator to process- Throws:
java.io.IOException
- In case of an I/O problem.
drawString
public void drawString(java.lang.String s,
float x,
float y)
- Overrides:
drawString
in class java.awt.Graphics2D
- See Also:
Graphics2D.drawString(java.lang.String, float, float)
drawString
public void drawString(java.text.AttributedCharacterIterator iterator,
float x,
float y)
- Overrides:
drawString
in class org.apache.xmlgraphics.java2d.AbstractGraphics2D
- See Also:
Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
drawRenderedImage
public void drawRenderedImage(java.awt.image.RenderedImage img,
java.awt.geom.AffineTransform xform)
- Overrides:
drawRenderedImage
in class java.awt.Graphics2D
- See Also:
Graphics2D.drawRenderedImage(java.awt.image.RenderedImage,
java.awt.geom.AffineTransform)
drawRenderableImage
public void drawRenderableImage(java.awt.image.renderable.RenderableImage img,
java.awt.geom.AffineTransform xform)
- Overrides:
drawRenderableImage
in class java.awt.Graphics2D
- See Also:
Graphics2D.drawRenderableImage(java.awt.image.renderable.RenderableImage,
java.awt.geom.AffineTransform)
drawImage
public boolean drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
- Overrides:
drawImage
in class java.awt.Graphics
- See Also:
Graphics.drawImage(java.awt.Image, int, int, int, int,
java.awt.image.ImageObserver)
drawImage
public boolean drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
- Overrides:
drawImage
in class java.awt.Graphics
- See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
copyArea
public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
- Overrides:
copyArea
in class java.awt.Graphics
- See Also:
Graphics.copyArea(int, int, int, int, int, int)
setXORMode
public void setXORMode(java.awt.Color c1)
- Overrides:
setXORMode
in class java.awt.Graphics
- See Also:
Graphics.setXORMode(java.awt.Color)
buildBufferedImage
protected java.awt.image.BufferedImage buildBufferedImage(java.awt.Dimension size)
- Creates a buffered image.
- Parameters:
size
- dimensions of the image to be created- Returns:
- the buffered image
getFontMetrics
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
- Overrides:
getFontMetrics
in class java.awt.Graphics
- See Also:
Graphics.getFontMetrics(java.awt.Font)
Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.