public class SVGGraphics2D extends VectorGraphics2D
Graphics2D implementation that saves all operations to a string
in the Scaled Vector Graphics (SVG) format.VectorGraphics2D.FontRendering| Constructor and Description |
|---|
SVGGraphics2D(double x,
double y,
double width,
double height)
Constructor that initializes a new
SVGGraphics2D instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints) |
protected String |
getFooter()
Returns a string of the footer to end a document.
|
protected void |
setAffineTransform(AffineTransform tx)
Sets the current transformation.
|
String |
toString() |
protected void |
writeClosingDraw(Shape s)
Write a command to draw the outline of a previously inserted shape.
|
protected void |
writeClosingFill(Shape s)
Write a command to fill the outline of a previously inserted shape.
|
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 |
writePath(Shape s)
Writes the beginning of the specified shape without any closing
commands.
|
protected void |
writeShape(Shape s)
Write the specified shape to the document.
|
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, drawRect, drawRenderableImage, drawRenderedImage, drawRoundRect, drawString, drawString, drawString, drawString, fill, fillArc, fillOval, fillRect, fillRoundRect, getBackground, getBounds, getBytes, getClip, getClipBounds, getColor, getComposite, getDeviceConfiguration, getFont, getFontMetrics, getFontRenderContext, getFontRendering, getPaint, getRasteredImageSizeMaximum, getRenderingHint, getRenderingHints, getResolution, getStroke, getTransform, hit, isDistorted, isTransformed, rotate, rotate, scale, setBackground, setClip, setClip, setColor, setComposite, setFont, setFontRendering, setPaint, setPaintMode, setRasteredImageSizeMaximum, setRenderingHint, setRenderingHints, setResolution, setStroke, setTransform, setXORMode, shear, size, transform, translate, translate, write, writelndraw3DRect, fill3DRectcreate, drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClippublic SVGGraphics2D(double x,
double y,
double width,
double height)
SVGGraphics2D 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.protected 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 drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolygon in class VectorGraphics2Dpublic void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolyline in class VectorGraphics2Dpublic void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
fillPolygon in class VectorGraphics2Dprotected void setAffineTransform(AffineTransform tx)
VectorGraphics2DsetAffineTransform in class VectorGraphics2Dtx - Current transformationprotected void writeHeader()
VectorGraphics2DwriteHeader in class VectorGraphics2Dprotected void writeClosingDraw(Shape s)
VectorGraphics2DwriteClosingDraw in class VectorGraphics2Ds - Shape that should be drawn.protected void writeClosingFill(Shape s)
VectorGraphics2DwriteClosingFill in class VectorGraphics2Ds - Shape that should be filled.protected void writeShape(Shape s)
VectorGraphics2DwriteShape in class VectorGraphics2Ds - Shape to be written.protected void writePath(Shape s)
s - Shape to be written.protected String getFooter()
VectorGraphics2DgetFooter in class VectorGraphics2Dpublic String toString()
toString in class VectorGraphics2DCopyright © 2010-2015. All Rights Reserved.