gov.sandia.postscript
Class PSGrBase

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--gov.sandia.postscript.PSGrBase
Direct Known Subclasses:
PSGraphics

public abstract class PSGrBase
extends Graphics

PSGr is a Graphics subclass that images to PostScript. (C) 1996 E.J. Friedman-Hill and Sandia National Labs

Version:
2.1
Author:
Ernest Friedman-Hill, ejfried@ca.sandia.gov, http://herzberg.ca.sandia.gov

Field Summary
protected  Color backClr
          The background color of the current widget.
protected static int charsPerRow
          number of chars in a full row of pixel data
protected  Rectangle clippingRect
           
protected  Color clr
          The current color
static boolean DEBUG
           
protected  Font font
          The current font
protected static char[] hd
          hexadecimal digits
protected  PrintWriter os
          Output stream where postscript goes
protected static int PAGEHEIGHT
           
protected static int PAGEWIDTH
           
protected static int XOFFSET
           
protected static int YOFFSET
           
 
Constructor Summary
PSGrBase()
          Constructs a new PSGr Object that write to stdout.
PSGrBase(Writer w)
          Constructs a new PSGr Object.
PSGrBase(Writer w, boolean emitProlog)
          Constructs a new PSGr Object.
 
Method Summary
protected  void arcTo(int x1, int y1, int x2, int y2, int dim)
           
 void clearRect(int x, int y, int width, int height)
          Clears the specified rectangle by filling it with the current background color of the current drawing surface.
 void clipRect(int x, int y, int width, int height)
          Deprecated.  
 void copyArea(int x, int y, int width, int height, int dx, int dy)
          Copies an area of the screen.
 Graphics create()
          Creates a new PSGr Object that is a copy of the original PSGr Object.
protected  void diagnostic(String s)
           
 void dispose()
          Disposes of this graphics context.
protected  void doArc(int x, int y, int width, int height, int startAngle, int arcAngle, boolean fill)
           
protected  boolean doImage(Image img, int x, int y, int width, int height, int sx, int sy, int sw, int sh, ImageObserver observer, Color bgcolor)
           
protected  void doPoly(int[] xPoints, int[] yPoints, int nPoints, boolean fill, boolean close)
           
protected  void doRect(int x, int y, int width, int height, boolean fill)
           
protected  void doRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, boolean fill)
           
 void draw3DRect(int x, int y, int width, int height, boolean raised)
          Draws a highlighted 3-D rectangle.
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Draws an arc bounded by the specified rectangle from startAngle to endAngle.
 void drawBytes(byte[] data, int offset, int length, int x, int y)
          Draws the specified bytes using the current font and color.
 void drawChars(char[] data, int offset, int length, int x, int y)
          Draws the specified characters using the current font and color.
 boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
          Draws the specified image at the specified coordinate (x, y).
 boolean drawImage(Image img, int x, int y, ImageObserver observer)
          Draws the specified image at the specified coordinate (x, y).
 boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
          Draws the specified image inside the specified rectangle.
 boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
          Draws the specified image inside the specified rectangle.
 boolean drawImage(Image img, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, Color c, ImageObserver observer)
          Warning this is not yet supported
 boolean drawImage(Image img, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, ImageObserver observer)
          Warning this is not yet supported
 void drawLine(int x1, int y1, int x2, int y2)
          Draws a line between the coordinates (x1,y1) and (x2,y2).
 void drawOval(int x, int y, int width, int height)
          Draws an oval inside the specified rectangle using the current color.
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Draws a polygon defined by an array of x points and y points.
 void drawPolygon(Polygon p)
          Draws a polygon defined by the specified point.
 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
          Draws a polygon defined by an array of x points and y points.
 void drawRect(int x, int y, int width, int height)
          Draws the outline of the specified rectangle using the current color.
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Draws an outlined rounded corner rectangle using the current color.
 void drawString(AttributedCharacterIterator ai, int x, int y)
           
 void drawString(String str, int x, int y)
          Draws the specified String using the current font and color.
protected  void emitColorImageProlog(int xdim)
           
protected  void emitProlog()
          Top of every PS file
 void emitThis(String s)
           
 void fill3DRect(int x, int y, int width, int height, boolean raised)
          Paints a highlighted 3-D rectangle using the current color.
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Fills an arc using the current color.
 void fillOval(int x, int y, int width, int height)
          Fills an oval inside the specified rectangle using the current color.
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Fills a polygon with the current color.
 void fillPolygon(Polygon p)
          Fills the specified polygon with the current color.
 void fillRect(int x, int y, int width, int height)
          Fills the specified rectangle with the current color.
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Draws a rounded rectangle filled in with the current color.
 void finalize()
          Disposes of this graphics context once it is no longer referenced.
 Shape getClip()
          Returns the bounding rectangle of the current clipping area.
 Rectangle getClipBounds()
          Returns the bounding rectangle of the current clipping area.
 Rectangle getClipRect()
          Deprecated.  
 Color getColor()
          Gets the current color.
 Font getFont()
          Gets the current font.
 FontMetrics getFontMetrics()
          Gets the current font metrics.
 FontMetrics getFontMetrics(Font f)
          Gets the current font metrics for the specified font.
 void grestore()
           
 void gsave()
           
protected  void lineto(int x, int y)
           
protected  void moveto(int x, int y)
           
protected  void scale(double x, double y)
          Scales the graphics context.
 void setBackground(Color c)
          Gets the current color.
 void setClip(int x, int y, int width, int height)
          Clips to a rectangle.
 void setClip(Shape s)
          Sets the clipping region using the shape's bounding rectangle.
 void setColor(Color c)
          Sets the current color to the specified color.
 void setFont(Font f)
          Sets the font for all subsequent text-drawing operations.
 void setOutput(Writer w)
          Change the Writer this context's output goes to.
 void setPaintMode()
          Sets the default paint mode to overwrite the destination with the current color.
 void setXORMode(Color c1)
          Sets the paint mode to alternate between the current color and the new specified color.
protected  void stroke(boolean fill)
           
 String toString()
          Returns a String object representing this Graphic's value.
protected  int transformY(int y)
          Flip Y coords so Postscript looks like Java
 void translate(int x, int y)
          Translates the specified parameters into the origin of the graphics context.
 
Methods inherited from class java.awt.Graphics
create, getClipBounds, hitClip
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG

PAGEHEIGHT

protected static final int PAGEHEIGHT

PAGEWIDTH

protected static final int PAGEWIDTH

XOFFSET

protected static final int XOFFSET

YOFFSET

protected static final int YOFFSET

hd

protected static final char[] hd
hexadecimal digits

charsPerRow

protected static final int charsPerRow
number of chars in a full row of pixel data

os

protected PrintWriter os
Output stream where postscript goes

clr

protected Color clr
The current color

backClr

protected Color backClr
The background color of the current widget. It's up to the client software to set this correctly!

font

protected Font font
The current font

clippingRect

protected Rectangle clippingRect
Constructor Detail

PSGrBase

public PSGrBase()
Constructs a new PSGr Object that write to stdout. Unlike regular Graphics objects, PSGr contexts can be created directly.

PSGrBase

public PSGrBase(Writer w)
Constructs a new PSGr Object. Unlike regular Graphics objects, PSGr contexts can be created directly.
Parameters:
o - Output stream for PostScript output

PSGrBase

public PSGrBase(Writer w,
                boolean emitProlog)
Constructs a new PSGr Object. Unlike regular Graphics objects, PSGr contexts can be created directly.
Parameters:
o - Output stream for PostScript output
Method Detail

create

public Graphics create()
Creates a new PSGr Object that is a copy of the original PSGr Object. Not implemented; throws RuntimeException
Overrides:
create in class Graphics

setOutput

public void setOutput(Writer w)
Change the Writer this context's output goes to.

translate

public void translate(int x,
                      int y)
Translates the specified parameters into the origin of the graphics context. All subsequent operations on this graphics context will be relative to this origin.
Overrides:
translate in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
See Also:
scale(double, double)

scale

protected void scale(double x,
                     double y)
Scales the graphics context. All subsequent operations on this graphics context will be affected.
Parameters:
sx - the scaled x coordinate
sy - the scaled y coordinate
See Also:
translate(int, int)

lineto

protected void lineto(int x,
                      int y)

moveto

protected void moveto(int x,
                      int y)

getColor

public Color getColor()
Gets the current color.
Overrides:
getColor in class Graphics
See Also:
setColor(java.awt.Color)

setBackground

public void setBackground(Color c)
Gets the current color.
See Also:
setColor(java.awt.Color)

setColor

public void setColor(Color c)
Sets the current color to the specified color. All subsequent graphics operations will use this specified color.
Overrides:
setColor in class Graphics
Parameters:
c - the color to be set
See Also:
Color, getColor()

setPaintMode

public void setPaintMode()
Sets the default paint mode to overwrite the destination with the current color. PostScript has only paint mode.
Overrides:
setPaintMode in class Graphics

setXORMode

public void setXORMode(Color c1)
Sets the paint mode to alternate between the current color and the new specified color. PostScript does not support XOR mode.
Overrides:
setXORMode in class Graphics
Parameters:
c1 - the second color

getFont

public Font getFont()
Gets the current font.
Overrides:
getFont in class Graphics
See Also:
setFont(java.awt.Font)

setFont

public void setFont(Font f)
Sets the font for all subsequent text-drawing operations.
Overrides:
setFont in class Graphics
Parameters:
font - the specified font
See Also:
Font, getFont(), drawString(java.lang.String, int, int), drawBytes(byte[], int, int, int, int), drawChars(char[], int, int, int, int)

getFontMetrics

public FontMetrics getFontMetrics()
Gets the current font metrics.
Overrides:
getFontMetrics in class Graphics
See Also:
getFont()

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Gets the current font metrics for the specified font.
Overrides:
getFontMetrics in class Graphics
Parameters:
f - the specified font
See Also:
getFont(), getFontMetrics()

getClipRect

public Rectangle getClipRect()
Deprecated.  

Returns the bounding rectangle of the current clipping area.
Overrides:
getClipRect in class Graphics
See Also:
clipRect(int, int, int, int), getClipBounds()

getClip

public Shape getClip()
Returns the bounding rectangle of the current clipping area.
Overrides:
getClip in class Graphics
See Also:
clipRect(int, int, int, int), getClipBounds()

setClip

public void setClip(Shape s)
Sets the clipping region using the shape's bounding rectangle.
Overrides:
setClip in class Graphics
Parameters:
s - A shape to set the clipping rectangle to

getClipBounds

public Rectangle getClipBounds()
Returns the bounding rectangle of the current clipping area.
Overrides:
getClipBounds in class Graphics
Returns:
the bounding rectangle
See Also:
clipRect(int, int, int, int), getClipRect()

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Clips to a rectangle. The resulting clipping area is the intersection of the current clipping area and the specified rectangle. Graphic operations have no effect outside of the clipping area.
Overrides:
setClip in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
See Also:
getClipRect()

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Deprecated.  

Overrides:
clipRect in class Graphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
Copies an area of the screen.
Overrides:
copyArea in class Graphics
Parameters:
x - the x-coordinate of the source
y - the y-coordinate of the source
width - the width
height - the height
dx - the horizontal distance
dy - the vertical distance Note: copyArea not supported by PostScript

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Draws a line between the coordinates (x1,y1) and (x2,y2). The line is drawn below and to the left of the logical coordinates.
Overrides:
drawLine in class Graphics
Parameters:
x1 - the first point's x coordinate
y1 - the first point's y coordinate
x2 - the second point's x coordinate
y2 - the second point's y coordinate

doRect

protected void doRect(int x,
                      int y,
                      int width,
                      int height,
                      boolean fill)

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Fills the specified rectangle with the current color.
Overrides:
fillRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
See Also:
drawRect(int, int, int, int), clearRect(int, int, int, int)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Draws the outline of the specified rectangle using the current color. Use drawRect(x, y, width-1, height-1) to draw the outline inside the specified rectangle.
Overrides:
drawRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
See Also:
fillRect(int, int, int, int), clearRect(int, int, int, int)

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Clears the specified rectangle by filling it with the current background color of the current drawing surface. Which drawing surface it selects depends on how the graphics context was created.
Overrides:
clearRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
See Also:
fillRect(int, int, int, int), drawRect(int, int, int, int)

doRoundRect

protected void doRoundRect(int x,
                           int y,
                           int width,
                           int height,
                           int arcWidth,
                           int arcHeight,
                           boolean fill)

stroke

protected void stroke(boolean fill)

arcTo

protected void arcTo(int x1,
                     int y1,
                     int x2,
                     int y2,
                     int dim)

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Draws an outlined rounded corner rectangle using the current color.
Overrides:
drawRoundRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
arcWidth - the diameter of the arc
arcHeight - the radius of the arc
See Also:
fillRoundRect(int, int, int, int, int, int)

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Draws a rounded rectangle filled in with the current color.
Overrides:
fillRoundRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
arcWidth - the diameter of the arc
arcHeight - the radius of the arc
See Also:
drawRoundRect(int, int, int, int, int, int)

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Draws a highlighted 3-D rectangle.
Overrides:
draw3DRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
raised - a boolean that states whether the rectangle is raised or not

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Paints a highlighted 3-D rectangle using the current color.
Overrides:
fill3DRect in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
raised - a boolean that states whether the rectangle is raised or not

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Draws an oval inside the specified rectangle using the current color.
Overrides:
drawOval in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
See Also:
fillOval(int, int, int, int)

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Fills an oval inside the specified rectangle using the current color.
Overrides:
fillOval in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
See Also:
drawOval(int, int, int, int)

doArc

protected void doArc(int x,
                     int y,
                     int width,
                     int height,
                     int startAngle,
                     int arcAngle,
                     boolean fill)

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Draws an arc bounded by the specified rectangle from startAngle to endAngle. 0 degrees is at the 3-o'clock position.Positive arc angles indicate counter-clockwise rotations, negative arc angles are drawn clockwise.
Overrides:
drawArc in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
startAngle - the beginning angle
arcAngle - the angle of the arc (relative to startAngle).
See Also:
fillArc(int, int, int, int, int, int)

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Fills an arc using the current color. This generates a pie shape.
Overrides:
fillArc in class Graphics
Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the arc
height - the height of the arc
startAngle - the beginning angle
arcAngle - the angle of the arc (relative to startAngle).
See Also:
drawArc(int, int, int, int, int, int)

doPoly

protected void doPoly(int[] xPoints,
                      int[] yPoints,
                      int nPoints,
                      boolean fill,
                      boolean close)

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Draws a polygon defined by an array of x points and y points.
Overrides:
drawPolyline in class Graphics
Parameters:
xPoints - an array of x points
yPoints - an array of y points
nPoints - the total number of points
See Also:
fillPolygon(int[], int[], int)

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Draws a polygon defined by an array of x points and y points.
Overrides:
drawPolygon in class Graphics
Parameters:
xPoints - an array of x points
yPoints - an array of y points
nPoints - the total number of points
See Also:
fillPolygon(int[], int[], int)

drawPolygon

public void drawPolygon(Polygon p)
Draws a polygon defined by the specified point.
Overrides:
drawPolygon in class Graphics
Parameters:
p - the specified polygon
See Also:
fillPolygon(int[], int[], int)

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Fills a polygon with the current color.
Overrides:
fillPolygon in class Graphics
Parameters:
xPoints - an array of x points
yPoints - an array of y points
nPoints - the total number of points
See Also:
drawPolygon(int[], int[], int)

fillPolygon

public void fillPolygon(Polygon p)
Fills the specified polygon with the current color.
Overrides:
fillPolygon in class Graphics
Parameters:
p - the polygon
See Also:
drawPolygon(int[], int[], int)

drawString

public void drawString(String str,
                       int x,
                       int y)
Draws the specified String using the current font and color. The x,y position is the starting point of the baseline of the String.
Overrides:
drawString in class Graphics
Parameters:
str - the String to be drawn
x - the x coordinate
y - the y coordinate
See Also:
drawChars(char[], int, int, int, int), drawBytes(byte[], int, int, int, int)

drawString

public void drawString(AttributedCharacterIterator ai,
                       int x,
                       int y)
Overrides:
drawString in class Graphics

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Draws the specified characters using the current font and color.
Overrides:
drawChars in class Graphics
Parameters:
data - the array of characters to be drawn
offset - the start offset in the data
length - the number of characters to be drawn
x - the x coordinate
y - the y coordinate
See Also:
drawString(java.lang.String, int, int), drawBytes(byte[], int, int, int, int)

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Draws the specified bytes using the current font and color.
Overrides:
drawBytes in class Graphics
Parameters:
data - the data to be drawn
offset - the start offset in the data
length - the number of bytes that are drawn
x - the x coordinate
y - the y coordinate
See Also:
drawString(java.lang.String, int, int), drawChars(char[], int, int, int, int)

doImage

protected boolean doImage(Image img,
                          int x,
                          int y,
                          int width,
                          int height,
                          int sx,
                          int sy,
                          int sw,
                          int sh,
                          ImageObserver observer,
                          Color bgcolor)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         ImageObserver observer)
Draws the specified image at the specified coordinate (x, y). If the image is incomplete the image observer will be notified later.
Overrides:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn
x - the x coordinate
y - the y coordinate
observer - notifies if the image is complete or not
See Also:
Image, ImageObserver

drawImage

public boolean drawImage(Image img,
                         int x1,
                         int y1,
                         int x2,
                         int y2,
                         int x3,
                         int y3,
                         int x4,
                         int y4,
                         ImageObserver observer)
Warning this is not yet supported
Overrides:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int x1,
                         int y1,
                         int x2,
                         int y2,
                         int x3,
                         int y3,
                         int x4,
                         int y4,
                         Color c,
                         ImageObserver observer)
Warning this is not yet supported
Overrides:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         ImageObserver observer)
Draws the specified image inside the specified rectangle. The image is scaled if necessary. If the image is incomplete the image observer will be notified later.
Overrides:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
observer - notifies if the image is complete or not
See Also:
Image, ImageObserver

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         Color bgcolor,
                         ImageObserver observer)
Draws the specified image at the specified coordinate (x, y). If the image is incomplete the image observer will be notified later.
Overrides:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn
x - the x coordinate
y - the y coordinate
bgcolor - the background color
observer - notifies if the image is complete or not
See Also:
Image, ImageObserver

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         ImageObserver observer)
Draws the specified image inside the specified rectangle. The image is scaled if necessary. If the image is incomplete the image observer will be notified later.
Overrides:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn
x - the x coordinate
y - the y coordinate
width - the width of the rectangle
height - the height of the rectangle
bgcolor - the background color
observer - notifies if the image is complete or not
See Also:
Image, NOTE: PSGr ignores the background color.

dispose

public void dispose()
Disposes of this graphics context. The Graphics context cannot be used after being disposed of.
Overrides:
dispose in class Graphics
See Also:
finalize()

finalize

public void finalize()
Disposes of this graphics context once it is no longer referenced.
Overrides:
finalize in class Graphics
See Also:
dispose()

toString

public String toString()
Returns a String object representing this Graphic's value.
Overrides:
toString in class Graphics

transformY

protected int transformY(int y)
Flip Y coords so Postscript looks like Java

emitProlog

protected void emitProlog()
Top of every PS file

emitColorImageProlog

protected void emitColorImageProlog(int xdim)

gsave

public void gsave()

grestore

public void grestore()

emitThis

public void emitThis(String s)

diagnostic

protected void diagnostic(String s)