public class EPSGraphics2D extends VectorGraphics2D
Graphics2D implementation that saves all operations to a string
in the Encapsulated PostScript® (EPS) format.VectorGraphics2D.FontRendering| Modifier and Type | Field and Description |
|---|---|
protected static double |
MM_IN_UNITS
Constant to convert values from millimeters to PostScript® units
(1/72th inch).
|
| Constructor and Description |
|---|
EPSGraphics2D(double x,
double y,
double width,
double height)
Constructor that initializes a new
EPSGraphics2D instance. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Encodes the painted data into a sequence of bytes.
|
protected String |
getFooter()
Returns a string of the footer to end a document.
|
void |
rotate(double theta) |
void |
rotate(double theta,
double x,
double y) |
void |
scale(double sx,
double sy) |
void |
setClip(Shape clip) |
void |
setColor(Color c) |
void |
setFont(Font font) |
void |
setStroke(Stroke s) |
void |
setTransform(AffineTransform tx) |
void |
shear(double sx,
double sy) |
void |
transform(AffineTransform tx) |
void |
translate(double tx,
double ty) |
protected void |
writeClosingDraw(Shape s)
Utility method for writing a tag closing fragment for drawing operations.
|
protected void |
writeClosingFill(Shape s)
Utility method for writing a tag closing fragment for filling operations.
|
protected void |
writeHeader()
Write the header to start a new document.
|
protected void |
writeImage(Image img,
int imgWidth,
int imgHeight,
double x,
double y,
double width,
double height)
Write the specified image to the document.
|
protected void |
writeShape(Shape s)
Utility method for writing an arbitrary shape to.
|
protected void |
writeString(String str,
double x,
double y)
Write a text string to the document at a specified position.
|
addRenderingHints, clearRect, clip, clipRect, copyArea, create, dispose, draw, drawArc, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, drawRenderableImage, drawRenderedImage, drawRoundRect, drawString, drawString, drawString, drawString, fill, fillArc, fillOval, fillPolygon, fillRect, fillRoundRect, getBackground, getBounds, getClip, getClipBounds, getColor, getComposite, getDeviceConfiguration, getFont, getFontMetrics, getFontRenderContext, getFontRendering, getPaint, getRasteredImageSizeMaximum, getRenderingHint, getRenderingHints, getResolution, getStroke, getTransform, hit, isDistorted, isTransformed, setAffineTransform, setBackground, setClip, setComposite, setFontRendering, setPaint, setPaintMode, setRasteredImageSizeMaximum, setRenderingHint, setRenderingHints, setResolution, setXORMode, size, toString, translate, write, writelndraw3DRect, fill3DRectcreate, drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClipprotected static final double MM_IN_UNITS
public EPSGraphics2D(double x,
double y,
double width,
double height)
EPSGraphics2D instance.
The document dimension must be specified as parameters.x - Left offset of document in millimeters.y - Top offset of document in millimeters.width - Width of document in millimeters.height - Height of document in millimeters.protected void writeString(String str, double x, double y)
VectorGraphics2DwriteString in class VectorGraphics2Dstr - Text to be rendered.x - Horizontal position in document units.y - Vertical position in document units.public void setStroke(Stroke s)
setStroke in class VectorGraphics2Dprotected void writeImage(Image img, int imgWidth, int imgHeight, double x, double y, double width, double height)
VectorGraphics2DwriteImage in class VectorGraphics2Dimg - Image to be rendered.imgWidth - Number of pixels in horizontal direction.imgHeight - Number of pixels in vertical directionx - Horizontal position in document units where the
upper left corner of the image should be placed.y - Vertical position in document units where the
upper left corner of the image should be placed.width - Width of the image in document units.height - Height of the image in document units.public void setColor(Color c)
setColor in class VectorGraphics2Dpublic void setFont(Font font)
setFont in class VectorGraphics2Dpublic void setClip(Shape clip)
setClip in class VectorGraphics2Dpublic void setTransform(AffineTransform tx)
setTransform in class VectorGraphics2Dpublic void translate(double tx,
double ty)
translate in class VectorGraphics2Dpublic void transform(AffineTransform tx)
transform in class VectorGraphics2Dpublic void scale(double sx,
double sy)
scale in class VectorGraphics2Dpublic void rotate(double theta)
rotate in class VectorGraphics2Dpublic void rotate(double theta,
double x,
double y)
rotate in class VectorGraphics2Dpublic void shear(double sx,
double sy)
shear in class VectorGraphics2Dprotected void writeHeader()
VectorGraphics2DwriteHeader in class VectorGraphics2Dprotected void writeClosingDraw(Shape s)
writeClosingDraw in class VectorGraphics2Ds - Shape.protected void writeClosingFill(Shape s)
writeClosingFill in class VectorGraphics2Ds - Shape.protected void writeShape(Shape s)
writeShape in class VectorGraphics2Ds - Shape.protected String getFooter()
VectorGraphics2DgetFooter in class VectorGraphics2Dpublic byte[] getBytes()
VectorGraphics2DgetBytes in class VectorGraphics2DCopyright © 2010-2015. All Rights Reserved.