public class EPSGraphics
extends java.awt.Graphics
Constructor and Description |
---|
EPSGraphics(java.io.OutputStream o,
int w,
int h,
boolean gray)
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 w,
int h)
Does nothing
|
void |
clipRect(int x,
int y,
int w,
int h)
Intersects the current clip with the specified rectangle.
|
void |
copyArea(int x,
int y,
int w,
int h,
int dx,
int dy)
Does nothing
|
java.awt.Graphics |
create()
Returns copy of current EPSGraphics setup, but not the actual EPS drawing
|
void |
dispose()
Does nothing
|
void |
drawArc(int x,
int y,
int w,
int h,
int startAngle,
int arcAngle)
Does nothing
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Does nothing
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Does nothing
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int w,
int h,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Does nothing
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int w,
int h,
java.awt.image.ImageObserver observer)
Does nothing
|
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)
Does nothing
|
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)
Does nothing
|
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 w,
int h)
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)
Draws a sequence of connected lines defined by arrays of x and y
coordinates.
|
void |
drawRect(int x,
int y,
int w,
int h) |
void |
drawRoundRect(int x,
int y,
int w,
int h,
int arcWidth,
int arcHeight)
Does nothing
|
void |
drawString(java.text.AttributedCharacterIterator str,
int x,
int y)
Does nothing.
|
void |
drawString(java.lang.String str,
int x,
int y) |
void |
fillArc(int x,
int y,
int w,
int h,
int startAngle,
int arcAngle)
Does nothing
|
void |
fillOval(int x,
int y,
int w,
int h)
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 w,
int h)
Fill the specified rectangle and draw a thin outline around it.
|
void |
fillRoundRect(int x,
int y,
int w,
int h,
int arcWidth,
int arcHeight)
Does nothing
|
java.awt.Shape |
getClip()
Does nothing
|
java.awt.Rectangle |
getClipBounds()
Does nothing
|
java.awt.Color |
getColor()
Returns the current color being used to draw the image
|
java.awt.Font |
getFont()
Returns the current font being used to draw text
|
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
Routes to the reference graphics object.
|
void |
setClip(int x,
int y,
int w,
int h)
Sets the current clip to the rectangle specified by the given
coordinates.
|
void |
setClip(java.awt.Shape clip)
Does nothing.
|
void |
setColor(java.awt.Color c)
Sets the current color depending on whether we are in RGB or greyscale
mode.
|
void |
setFont(java.awt.Font font)
Sets the current font to use for drawing text in the EPS file
|
void |
setPaintMode()
Does nothing.
|
void |
setXORMode(java.awt.Color c1)
Does nothing.
|
void |
showpage()
Issue the PostScript showpage command, then write and flush the output.
|
void |
translate(int x,
int y)
Does nothing.
|
public EPSGraphics(java.io.OutputStream o, int w, int h, boolean gray)
o
- The stream to write to, or null to write to standard out.w
- The width of the plot graphic, in units of 1/72 inch.h
- The height of the plot graphic, in units of 1/72 inch.gray
- Whether we want to output greyscale or notpublic void clearRect(int x, int y, int w, int h)
clearRect
in class java.awt.Graphics
public void clipRect(int x, int y, int w, int h)
clipRect
in class java.awt.Graphics
x
- x-coordinate of the rectangle to intersect the clip with.y
- y-coordinate of the rectangle to intersect the clip with.w
- width of the rectangle to intersect the clip with.h
- height of the rectangle to intersect the clip with.public void copyArea(int x, int y, int w, int h, 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 w, int h, 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 w, int h, 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 w, int h, 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
xPoints
- an array of x pointsyPoints
- an array of y pointsnPoints
- the total number of pointspublic 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 w, int h)
drawOval
in class java.awt.Graphics
x
- The x coordinate of the upper left cornery
- The y coordinate of the upper left cornerw
- The width of the oval to be filled.h
- The height of the oval to be filled.public void drawRect(int x, int y, int w, int h)
drawRect
in class java.awt.Graphics
public void drawRoundRect(int x, int y, int w, int h, int arcWidth, int arcHeight)
drawRoundRect
in class java.awt.Graphics
public void drawString(java.lang.String str, int x, int y)
drawString
in class java.awt.Graphics
public void drawString(java.text.AttributedCharacterIterator str, int x, int y)
drawString
in class java.awt.Graphics
public void fillArc(int x, int y, int w, int h, 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 w, int h)
fillOval
in class java.awt.Graphics
x
- The x coordinate of the upper left cornery
- The y coordinate of the upper left cornerw
- The width of the oval to be filled.h
- The height of the oval to be filled.public void fillRect(int x, int y, int w, int h)
fillRect
in class java.awt.Graphics
x
- The x coordinate of the top left corner.y
- The y coordinate of the top left corner.w
- The width of the rectangle.h
- The height of the rectangle.public void fillRoundRect(int x, int y, int w, int h, 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
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
font
- java.awt.Font to use for setting text. If this font is not
installed in your postscript system then your generated image
may not look as you intended it.public void setClip(java.awt.Shape clip)
setClip
in class java.awt.Graphics
public void setClip(int x, int y, int w, int h)
setClip
in class java.awt.Graphics
x
- The x coordinate of the new clip rectangle.y
- The y coordinate of the new clip rectangle.w
- The width of the new clip rectangle.h
- The height of the new clip rectangle.public void setColor(java.awt.Color c)
setColor
in class java.awt.Graphics
c
- The desired current color.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