public class EPSGraphics
extends java.awt.Graphics
Constructor and Description |
---|
EPSGraphics(java.io.OutputStream out,
int width,
int height)
Constructor for a graphics object that writes encapsulated
PostScript to the specified output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
clearRect(int x,
int y,
int width,
int height) |
void |
clipRect(int x,
int y,
int width,
int height) |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy) |
java.awt.Graphics |
create() |
void |
dispose() |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle) |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer) |
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.Color bgcolor,
java.awt.image.ImageObserver observer) |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer) |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer) |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer) |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line, using the current color, between the points (x1, y1)
and (x2, y2) in this graphics context's coordinate system.
|
void |
drawOval(int x,
int y,
int width,
int height)
Draw an oval bounded by the specified rectangle with the current color.
|
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draw a closed polygon defined by arrays of x and y coordinates.
|
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints) |
void |
drawRect(int x,
int y,
int width,
int height) |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) |
void |
drawString(java.text.AttributedCharacterIterator iterator,
int x,
int y) |
void |
drawString(java.lang.String str,
int x,
int y)
Draw a string. "(" is converted to "\(" and
")" is converted to "\) so as to avoid EPS Syntax errors.
|
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle) |
void |
fillOval(int x,
int y,
int width,
int height)
Fill an oval bounded by the specified rectangle with the current color.
|
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draw a filled polygon defined by arrays of x and y coordinates.
|
void |
fillRect(int x,
int y,
int width,
int height)
Fill the specified rectangle and draw a thin outline around it.
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) |
java.awt.Shape |
getClip() |
java.awt.Rectangle |
getClipBounds() |
java.awt.Color |
getColor()
Get the current color.
|
java.awt.Font |
getFont() |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f) |
void |
setClip(int x,
int y,
int width,
int height) |
void |
setClip(java.awt.Shape clip) |
void |
setColor(java.awt.Color c)
Set the current color.
|
void |
setFont(java.awt.Font font) |
void |
setPaintMode() |
void |
setXORMode(java.awt.Color c1) |
void |
showpage()
Issue the PostScript showpage command, then write and flush the output.
|
void |
translate(int x,
int y) |
public EPSGraphics(java.io.OutputStream out, int width, int height)
out
- The stream to write to, or null to write to standard out.width
- The width of the plot graphic, in units of 1/72 inch.height
- The height of the plot graphic, in units of 1/72 inch.public void clearRect(int x, int y, int width, int height)
clearRect
in class java.awt.Graphics
public void clipRect(int x, int y, int width, int height)
clipRect
in class java.awt.Graphics
public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in class java.awt.Graphics
public java.awt.Graphics create()
create
in class java.awt.Graphics
public void dispose()
dispose
in class java.awt.Graphics
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class java.awt.Graphics
x1
- the x coordinate of the first point.y1
- the y coordinate of the first point.x2
- the x coordinate of the second point.y2
- the y coordinate of the second point.public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class java.awt.Graphics
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class java.awt.Graphics
xPoints
- An array of x coordinates.yPoints
- An array of y coordinates.nPoints
- The total number of vertices.public void drawOval(int x, int y, int width, int height)
drawOval
in class java.awt.Graphics
x
- The x coordinate of the upper left cornery
- The y coordinate of the upper left cornerwidth
- The width of the oval to be filled.height
- The height of the oval to be filled.public void drawRect(int x, int y, int width, int height)
drawRect
in class java.awt.Graphics
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in class java.awt.Graphics
public void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
drawString
in class java.awt.Graphics
public void drawString(java.lang.String str, int x, int y)
drawString
in class java.awt.Graphics
str
- The string to draw.x
- The x location of the string.y
- The y location of the string.public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
in class java.awt.Graphics
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class java.awt.Graphics
xPoints
- An array of x coordinates.yPoints
- An array of y coordinates.nPoints
- The total number of vertices.public void fillOval(int x, int y, int width, int height)
fillOval
in class java.awt.Graphics
x
- The x coordinate of the upper left cornery
- The y coordinate of the upper left cornerwidth
- The width of the oval to be filled.height
- The height of the oval to be filled.public void fillRect(int x, int y, int width, int height)
fillRect
in class java.awt.Graphics
x
- The x coordinate of the top left corner.y
- The y coordinate of the top left corner.width
- The width of the rectangle.height
- The height of the rectangle.public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in class java.awt.Graphics
public java.awt.Shape getClip()
getClip
in class java.awt.Graphics
public java.awt.Rectangle getClipBounds()
getClipBounds
in class java.awt.Graphics
public java.awt.Color getColor()
getColor
in class java.awt.Graphics
setColor(Color)
public java.awt.Font getFont()
getFont
in class java.awt.Graphics
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
getFontMetrics
in class java.awt.Graphics
public void setFont(java.awt.Font font)
setFont
in class java.awt.Graphics
public void setClip(java.awt.Shape clip)
setClip
in class java.awt.Graphics
public void setClip(int x, int y, int width, int height)
setClip
in class java.awt.Graphics
public void setColor(java.awt.Color c)
setColor
in class java.awt.Graphics
c
- The desired current color.getColor()
public void setPaintMode()
setPaintMode
in class java.awt.Graphics
public void setXORMode(java.awt.Color c1)
setXORMode
in class java.awt.Graphics
public void showpage()
public void translate(int x, int y)
translate
in class java.awt.Graphics