|
||||||||||
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.foray.graphic.batik.PSGraphics2D
public class PSGraphics2D
Implementation of AbstractGraphics2D suitable for integration with Batik for purposes of converting SVG to PostScript.
Field Summary |
---|
Fields inherited from class org.apache.xmlgraphics.java2d.AbstractGraphics2D |
---|
gc, inPossibleRecursion, textAsShapes |
Constructor Summary | |
---|---|
PSGraphics2D(boolean textAsShapes,
CharacterOutputStream out,
org.apache.commons.logging.Log logger)
Create a new PDFGraphics2D with the given pdf document info. |
|
PSGraphics2D(PSGraphics2D g,
org.apache.commons.logging.Log logger)
Constructor supporting the create() method. |
Method Summary | |
---|---|
protected void |
applyPaint(Paint paint,
boolean fill)
Apply the paint to this graphic. |
protected void |
applyStroke(Stroke stroke)
Draw the graphic using a specified Stroke. |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
|
Graphics |
create()
|
void |
dispose()
|
protected void |
doDrawing(boolean fill,
boolean stroke,
boolean nonzero)
Write the command to the renderer. |
void |
draw(Shape s)
|
boolean |
drawImage(Image img,
int x,
int y,
ImageObserver observer)
|
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
ImageObserver observer)
|
void |
drawRenderableImage(RenderableImage img,
AffineTransform xform)
|
void |
drawRenderedImage(RenderedImage img,
AffineTransform xform)
|
void |
drawString(AttributedCharacterIterator iterator,
float x,
float y)
|
void |
drawString(String s,
float x,
float y)
|
void |
fill(Shape s)
|
GraphicsConfiguration |
getDeviceConfiguration()
|
FontMetrics |
getFontMetrics(Font f)
|
void |
setGraphicContext(org.apache.xmlgraphics.java2d.GraphicContext c)
Sets the graphic context. |
void |
setXORMode(Color c1)
|
protected void |
writeClip(Shape s)
Creates code to clip along a given shape. |
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 |
Constructor Detail |
---|
public PSGraphics2D(boolean textAsShapes, CharacterOutputStream out, org.apache.commons.logging.Log logger)
textAsShapes
- Indicates whether text should be treated as text
(false), or whether it should be converted to its paths (true).out
- The output stream to which the content should be written.logger
- The logger.public PSGraphics2D(PSGraphics2D g, org.apache.commons.logging.Log logger)
create()
method.
g
- The wrapped graphic.logger
- The logger.Method Detail |
---|
public void setGraphicContext(org.apache.xmlgraphics.java2d.GraphicContext c)
c
- The new graphic context.public Graphics create()
create
in class Graphics
public boolean drawImage(Image img, int x, int y, ImageObserver observer)
drawImage
in class Graphics
public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
drawImage
in class Graphics
public void dispose()
dispose
in class Graphics
public void draw(Shape s)
draw
in class Graphics2D
protected void writeClip(Shape s) throws IOException
s
- The shape upon which the clip should be created.
IOException
- For I/O errors writing the content.protected void applyPaint(Paint paint, boolean fill)
paint
- The paint to use.fill
- Indicates whether the paint is for fill (true) or stroke
(false).protected void applyStroke(Stroke stroke) throws IOException
stroke
- The stroke to use for drawing.
IOException
- For I/O errors writing the content.public void drawRenderedImage(RenderedImage img, AffineTransform xform)
drawRenderedImage
in class Graphics2D
public void drawRenderableImage(RenderableImage img, AffineTransform xform)
drawRenderableImage
in class Graphics2D
public void drawString(String s, float x, float y)
drawString
in class Graphics2D
public void drawString(AttributedCharacterIterator iterator, float x, float y)
drawString
in class org.apache.xmlgraphics.java2d.AbstractGraphics2D
public void fill(Shape s)
fill
in class Graphics2D
protected void doDrawing(boolean fill, boolean stroke, boolean nonzero) throws IOException
fill
- Set to true if filling.stroke
- Set to true if stroking.nonzero
- Set to true to use the nonzero winding number rule.
IOException
- For IO errors on output.public GraphicsConfiguration getDeviceConfiguration()
getDeviceConfiguration
in class Graphics2D
public FontMetrics getFontMetrics(Font f)
getFontMetrics
in class Graphics
public void setXORMode(Color c1)
setXORMode
in class Graphics
public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in class Graphics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |