/** Draws a polygon defined by an array of x points and y points */ private native void pDrawPolygon(int xPoints[], int yPoints[], int nPoints); public void drawPolygon(int xPoints[], int yPoints[], int nPoints) { ourSetClip(); pDrawPolygon(xPoints,yPoints,nPoints); } /** Draws a polygon defined by an array of x points and y points */ private native void pDrawPolyline(int xPoints[], int yPoints[], int nPoints); public void drawPolyline(int xPoints[], int yPoints[], int nPoints) { ourSetClip(); pDrawPolyline(xPoints,yPoints,nPoints); } /** Fills a polygon with the current fill mask */ private native void pFillPolygon(int xPoints[], int yPoints[], int nPoints); public void fillPolygon(int xPoints[], int yPoints[], int nPoints) { ourSetClip(); pFillPolygon(xPoints,yPoints,nPoints); } /** Draws an oval to fit in the given rectangle */ private native void pDrawOval(int x, int y, int w, int h); public void drawOval(int x, int y, int w, int h) { ourSetClip(); pDrawOval(x,y,w,h); } /** Fills an oval to fit in the given rectangle */ private native void pFillOval(int x, int y, int w, int h); public void fillOval(int x, int y, int w, int h) { ourSetClip(); pFillOval(x,y,w,h); } /** * Draws an arc bounded by the given rectangle from startAngle to * endAngle. 0 degrees is a vertical line straight up from the * center of the rectangle. Positive angles indicate clockwise * rotations, negative angle are counter-clockwise. */ private native void pDrawArc(int x, int y, int w, int h, int startAngle, int endAngle); public void drawArc(int x, int y, int w, int h, int startAngle, int endAngle) { ourSetClip(); pDrawArc(x,y,w,h,startAngle,endAngle); } /** fills an arc. arguments are the same as drawArc. */ private native void pFillArc(int x, int y, int w, int h, int startAngle, int endAngle); public void fillArc(int x, int y, int w, int h, int startAngle, int endAngle) { ourSetClip(); pFillArc(x,y,w,h,startAngle,endAngle); } public String toString() { return (getClass().getName() + "[" + originX + "," + originY + "[font=" + getFont() + "], color=" + getColor() + "]"); } // Print a peer using this graphics object. void print(ComponentPeer peer) { } /* Outline the given region. */ //public native void drawRegion(Region r); /* Fill the given region. */ //public native void fillRegion(Region r); /** Terminates a PrintJob and releases resources */ public void close(PrintJob pj) { } private native void copyOffscreenImage(int X, int Y, int W, int H); } Lines 501–606 of 606. Previous lines
/** Draws a polygon defined by an array of x points and y points */ private native void pDrawPolygon(int xPoints[], int yPoints[], int nPoints); public void drawPolygon(int xPoints[], int yPoints[], int nPoints) { ourSetClip(); pDrawPolygon(xPoints,yPoints,nPoints); } /** Draws a polygon defined by an array of x points and y points */ private native void pDrawPolyline(int xPoints[], int yPoints[], int nPoints); public void drawPolyline(int xPoints[], int yPoints[], int nPoints) { ourSetClip(); pDrawPolyline(xPoints,yPoints,nPoints); } /** Fills a polygon with the current fill mask */ private native void pFillPolygon(int xPoints[], int yPoints[], int nPoints); public void fillPolygon(int xPoints[], int yPoints[], int nPoints) { ourSetClip(); pFillPolygon(xPoints,yPoints,nPoints); } /** Draws an oval to fit in the given rectangle */ private native void pDrawOval(int x, int y, int w, int h); public void drawOval(int x, int y, int w, int h) { ourSetClip(); pDrawOval(x,y,w,h); } /** Fills an oval to fit in the given rectangle */ private native void pFillOval(int x, int y, int w, int h); public void fillOval(int x, int y, int w, int h) { ourSetClip(); pFillOval(x,y,w,h); } /** * Draws an arc bounded by the given rectangle from startAngle to * endAngle. 0 degrees is a vertical line straight up from the * center of the rectangle. Positive angles indicate clockwise * rotations, negative angle are counter-clockwise. */ private native void pDrawArc(int x, int y, int w, int h, int startAngle, int endAngle); public void drawArc(int x, int y, int w, int h, int startAngle, int endAngle) { ourSetClip(); pDrawArc(x,y,w,h,startAngle,endAngle); } /** fills an arc. arguments are the same as drawArc. */ private native void pFillArc(int x, int y, int w, int h, int startAngle, int endAngle); public void fillArc(int x, int y, int w, int h, int startAngle, int endAngle) { ourSetClip(); pFillArc(x,y,w,h,startAngle,endAngle); } public String toString() { return (getClass().getName() + "[" + originX + "," + originY + "[font=" + getFont() + "], color=" + getColor() + "]"); } // Print a peer using this graphics object. void print(ComponentPeer peer) { } /* Outline the given region. */ //public native void drawRegion(Region r); /* Fill the given region. */ //public native void fillRegion(Region r); /** Terminates a PrintJob and releases resources */ public void close(PrintJob pj) { } private native void copyOffscreenImage(int X, int Y, int W, int H); }