|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Graphics | +--ptolemy.plot.PtolemyGraphics | +--ptolemy.plot.EPSGraphics
Graphics class supporting EPS export from plots. If this is used from within an applet, then the output goes to the standard output. Unfortunately, with standard browsers, this is not useful. With MS Internet Explorer, standard output is not available. With Netscape Navigator, standard output is available in the Java console, but is limited to fewer lines than what is usually generated. Thus, we recommend using this within Sun's appletviewer, and redirecting its standard output to a file.
Constructor Summary | |
EPSGraphics(java.io.OutputStream out,
int width,
int height)
Constructor for a graphics object that writes encapsulated PostScript to the specified output stream. |
Method Summary | |
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.lang.String str,
int x,
int y)
|
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()
|
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)
|
Methods inherited from class ptolemy.plot.PtolemyGraphics |
drawString |
Methods inherited from class java.awt.Graphics |
create,
draw3DRect,
drawBytes,
drawChars,
drawPolygon,
fill3DRect,
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 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.Method Detail |
public void clearRect(int x, int y, int width, int height)
public void clipRect(int x, int y, int width, int height)
public void copyArea(int x, int y, int width, int height, int dx, int dy)
public java.awt.Graphics create()
public void dispose()
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
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)
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)
public void drawLine(int x1, int y1, int x2, int y2)
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)
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
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)
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)
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
public void drawString(java.lang.String str, int x, int y)
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
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)
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)
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)
public java.awt.Shape getClip()
public java.awt.Rectangle getClipBounds()
public java.awt.Color getColor()
public java.awt.Font getFont()
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
public void setFont(java.awt.Font font)
public void setClip(java.awt.Shape clip)
public void setClip(int x, int y, int width, int height)
public void setColor(java.awt.Color c)
c
- The desired current color.public void setPaintMode()
public void setXORMode(java.awt.Color c1)
public void showpage()
public void translate(int x, int y)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |