|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Graphics
|
+--dclap.Gr2PICT
Gr2PICT is a Graphics subclass that draws to PICT format.
| Field Summary | |
protected java.awt.Rectangle |
clipr
|
static int |
CLONE
|
protected java.awt.Color |
clr
|
protected java.awt.Font |
font
|
protected java.awt.Graphics |
g
|
protected java.awt.Point |
origin
|
protected java.io.DataOutputStream |
os
|
protected static int |
PAGEHEIGHT
|
protected static int |
PAGEWIDTH
|
protected boolean |
trouble
|
| Constructor Summary | |
Gr2PICT(java.io.OutputStream o,
java.awt.Graphics g)
Constructs a new Gr2PICT Object. |
|
Gr2PICT(java.io.OutputStream o,
java.awt.Graphics g,
int what)
|
|
| Method Summary | |
void |
beginPicGroup()
|
boolean |
checkError()
|
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)
Clips to a rectangle. |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
Copies an area of the screen. |
java.awt.Graphics |
create()
Creates a new Gr2PICT Object that is a copy of the original Gr2PICT Object. |
java.awt.Graphics |
create(int x,
int y,
int width,
int height)
Creates a new Graphics Object with the specified parameters, based on the original Graphics Object. |
void |
dispose()
Disposes of this graphics context. |
boolean |
doImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer,
java.awt.Color bgcolor)
// possible data for imaging // hexadecimal digits protected final static char hd[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; // number of chars in a full row of pixel data protected final static int charsPerRow = 12*6; |
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(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draws the specified image at the specified coordinate (x, y). |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Draws the specified image at the specified coordinate (x, y). |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draws the specified image inside the specified rectangle. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
Draws the specified image inside the specified rectangle. |
boolean |
drawImage(java.awt.Image i,
int a,
int b,
int c,
int d,
int e,
int f,
int g,
int h,
java.awt.Color cl,
java.awt.image.ImageObserver o)
|
boolean |
drawImage(java.awt.Image i,
int a,
int b,
int c,
int d,
int e,
int f,
int g,
int h,
java.awt.image.ImageObserver o)
|
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(java.awt.Polygon p)
Draws a polygon defined by the specified point. |
void |
drawPolyline(int[] a,
int[] b,
int c)
|
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(java.text.AttributedCharacterIterator aci,
int a,
int b)
|
void |
drawString(java.lang.String str,
int x,
int y)
Draws the specified String using the current font and color. |
protected void |
emitbyte(int v)
|
protected void |
emitcolor(java.awt.Color c)
|
protected void |
emitcomment(int kind,
int datasize,
java.lang.String data)
|
protected void |
emitHeader(int picwidth,
int picheight)
Top of every PICT file |
protected void |
emitint(int v)
|
protected void |
emitop(int op)
|
protected void |
emitpolygon(java.awt.Polygon p)
|
protected void |
emitrect(int x,
int y,
int width,
int height)
|
protected void |
emitroundrect(int opcode,
int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
protected void |
emitstring(java.lang.String s)
|
protected void |
emitword(int v)
|
void |
endPicGroup()
|
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(java.awt.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. |
java.awt.Rectangle |
getBounds()
Returns the bounding rectangle of the current clipping area. |
java.awt.Shape |
getClip()
|
java.awt.Rectangle |
getClipBounds()
|
java.awt.Color |
getColor()
Gets the current color. |
java.awt.Font |
getFont()
Gets the current font. |
java.awt.FontMetrics |
getFontMetrics()
Gets the current font metrics. |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
Gets the current font metrics for the specified font. |
void |
laserLine(int num,
int denom)
|
void |
setClip(int a,
int b,
int c,
int d)
|
void |
setClip(java.awt.Shape a)
|
void |
setColor(java.awt.Color c)
Sets the current color to the specified color. |
void |
setFont(java.awt.Font f)
Sets the font for all subsequent text-drawing operations. |
void |
setPaintMode()
Sets the default paint mode to overwrite the destination with the current color. |
void |
setXORMode(java.awt.Color c1)
Sets the paint mode to alternate between the current color and the new specified color. |
java.lang.String |
toString()
Returns a String object representing this Graphic's value. |
void |
translate(int x,
int y)
Translates the specified parameters into the origin of the graphics context. |
| Methods inherited from class java.awt.Graphics |
getClipBounds, getClipRect, hitClip |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.awt.Rectangle clipr
public static final int CLONE
protected java.awt.Color clr
protected java.awt.Font font
protected java.awt.Graphics g
protected java.awt.Point origin
protected java.io.DataOutputStream os
protected static final int PAGEHEIGHT
protected static final int PAGEWIDTH
protected boolean trouble
| Constructor Detail |
public Gr2PICT(java.io.OutputStream o,
java.awt.Graphics g)
o - Output stream for PostScript outputcreate()
public Gr2PICT(java.io.OutputStream o,
java.awt.Graphics g,
int what)
| Method Detail |
public final void beginPicGroup()
public boolean checkError()
public void clearRect(int x,
int y,
int width,
int height)
clearRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglefillRect(int, int, int, int),
drawRect(int, int, int, int)
public void clipRect(int x,
int y,
int width,
int height)
clipRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangleGraphics.getClipRect()
public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
copyArea in class java.awt.Graphicsx - the x-coordinate of the sourcey - the y-coordinate of the sourcewidth - the widthheight - the heightdx - the horizontal distancedy - the vertical distancepublic java.awt.Graphics create()
create in class java.awt.Graphics
public java.awt.Graphics create(int x,
int y,
int width,
int height)
create in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the areaheight - the height of the areatranslate(int, int)public void dispose()
dispose in class java.awt.Graphicsfinalize()
public boolean doImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer,
java.awt.Color bgcolor)
public void draw3DRect(int x,
int y,
int width,
int height,
boolean raised)
draw3DRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangleraised - a boolean that states whether the rectangle is raised or not
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
drawArc in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglestartAngle - the beginning anglearcAngle - the angle of the arc (relative to startAngle).fillArc(int, int, int, int, int, int)
public void drawBytes(byte[] data,
int offset,
int length,
int x,
int y)
drawBytes in class java.awt.Graphicsdata - the data to be drawnoffset - the start offset in the datalength - the number of bytes that are drawnx - the x coordinatey - the y coordinatedrawString(java.text.AttributedCharacterIterator, int, int),
drawChars(char[], int, int, int, int)
public void drawChars(char[] data,
int offset,
int length,
int x,
int y)
drawChars in class java.awt.Graphicsdata - the array of characters to be drawnoffset - the start offset in the datalength - the number of characters to be drawnx - the x coordinatey - the y coordinatedrawString(java.text.AttributedCharacterIterator, int, int),
drawBytes(byte[], int, int, int, int)
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.Graphicsimg - the specified image to be drawnx - the x coordinatey - the y coordinatebgcolor - the background colorobserver - notifies if the image is complete or notImage,
ImageObserver
public boolean drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphicsimg - the specified image to be drawnx - the x coordinatey - the y coordinateobserver - notifies if the image is complete or notImage,
ImageObserver
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.Graphicsimg - the specified image to be drawnx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglebgcolor - the background colorobserver - notifies if the image is complete or notImage,
ImageObserver
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.Graphicsimg - the specified image to be drawnx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangleobserver - notifies if the image is complete or notImage,
ImageObserver
public boolean drawImage(java.awt.Image i,
int a,
int b,
int c,
int d,
int e,
int f,
int g,
int h,
java.awt.Color cl,
java.awt.image.ImageObserver o)
drawImage in class java.awt.Graphics
public boolean drawImage(java.awt.Image i,
int a,
int b,
int c,
int d,
int e,
int f,
int g,
int h,
java.awt.image.ImageObserver o)
drawImage in class java.awt.Graphics
public void drawLine(int x1,
int y1,
int x2,
int y2)
drawLine in class java.awt.Graphicsx1 - the first point's x coordinatey1 - the first point's y coordinatex2 - the second point's x coordinatey2 - the second point's y coordinate
public void drawOval(int x,
int y,
int width,
int height)
drawOval in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglefillOval(int, int, int, int)
public void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolygon in class java.awt.GraphicsxPoints - an array of x pointsyPoints - an array of y pointsnPoints - the total number of pointsfillPolygon(int[], int[], int)public void drawPolygon(java.awt.Polygon p)
drawPolygon in class java.awt.Graphicsp - the specified polygonfillPolygon(int[], int[], int)
public void drawPolyline(int[] a,
int[] b,
int c)
drawPolyline in class java.awt.Graphics
public void drawRect(int x,
int y,
int width,
int height)
drawRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglefillRect(int, int, int, int),
clearRect(int, int, int, int)
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
drawRoundRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglearcWidth - the diameter of the arcarcHeight - the radius of the arcfillRoundRect(int, int, int, int, int, int)
public void drawString(java.text.AttributedCharacterIterator aci,
int a,
int b)
drawString in class java.awt.Graphics
public void drawString(java.lang.String str,
int x,
int y)
drawString in class java.awt.Graphicsstr - the String to be drawnx - the x coordinatey - the y coordinatedrawChars(char[], int, int, int, int),
drawBytes(byte[], int, int, int, int)protected void emitbyte(int v)
protected final void emitcolor(java.awt.Color c)
protected void emitcomment(int kind,
int datasize,
java.lang.String data)
protected void emitHeader(int picwidth,
int picheight)
protected void emitint(int v)
protected final void emitop(int op)
protected void emitpolygon(java.awt.Polygon p)
protected final void emitrect(int x,
int y,
int width,
int height)
protected final void emitroundrect(int opcode,
int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
protected void emitstring(java.lang.String s)
protected void emitword(int v)
public final void endPicGroup()
public void fill3DRect(int x,
int y,
int width,
int height,
boolean raised)
fill3DRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangleraised - a boolean that states whether the rectangle is raised or not
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
fillArc in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the archeight - the height of the arcstartAngle - the beginning anglearcAngle - the angle of the arc (relative to startAngle).drawArc(int, int, int, int, int, int)
public void fillOval(int x,
int y,
int width,
int height)
fillOval in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangledrawOval(int, int, int, int)
public void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
fillPolygon in class java.awt.GraphicsxPoints - an array of x pointsyPoints - an array of y pointsnPoints - the total number of pointsdrawPolygon(int[], int[], int)public void fillPolygon(java.awt.Polygon p)
fillPolygon in class java.awt.Graphicsp - the polygondrawPolygon(int[], int[], int)
public void fillRect(int x,
int y,
int width,
int height)
fillRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangledrawRect(int, int, int, int),
clearRect(int, int, int, int)
public void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
fillRoundRect in class java.awt.Graphicsx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectanglearcWidth - the diameter of the arcarcHeight - the radius of the arcdrawRoundRect(int, int, int, int, int, int)public void finalize()
finalize in class java.awt.Graphicsdispose()public java.awt.Rectangle getBounds()
clipRect(int, int, int, int)public java.awt.Shape getClip()
getClip in class java.awt.Graphicspublic java.awt.Rectangle getClipBounds()
getClipBounds in class java.awt.Graphicspublic java.awt.Color getColor()
getColor in class java.awt.GraphicssetColor(java.awt.Color)public java.awt.Font getFont()
getFont in class java.awt.GraphicssetFont(java.awt.Font)public java.awt.FontMetrics getFontMetrics()
getFontMetrics in class java.awt.GraphicsgetFont()public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
getFontMetrics in class java.awt.Graphicsf - the specified fontgetFont(),
getFontMetrics()
public void laserLine(int num,
int denom)
public void setClip(int a,
int b,
int c,
int d)
setClip in class java.awt.Graphicspublic void setClip(java.awt.Shape a)
setClip in class java.awt.Graphicspublic void setColor(java.awt.Color c)
setColor in class java.awt.Graphicsc - the color to be setColor,
getColor()public void setFont(java.awt.Font f)
setFont in class java.awt.Graphicsfont - the specified fontFont,
getFont(),
drawString(java.text.AttributedCharacterIterator, int, int),
drawBytes(byte[], int, int, int, int),
drawChars(char[], int, int, int, int)public void setPaintMode()
setPaintMode in class java.awt.Graphicspublic void setXORMode(java.awt.Color c1)
setXORMode in class java.awt.Graphicsc1 - the second colorpublic java.lang.String toString()
toString in class java.awt.Graphics
public void translate(int x,
int y)
translate in class java.awt.Graphicsx - the x coordinatey - the y coordinate#scale
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||