1 19 20 package swingwt.awt; 21 22 import swingwt.awt.geom.*; 23 24 public class Polygon implements Shape { 25 26 public int npoints; 27 public int xpoints[]; 28 public int ypoints[]; 29 protected Rectangle bounds; 30 31 public Polygon() { 32 } 33 public Polygon(int xpoints[], int ypoints[], int npoints) { 34 } 35 public void reset() { 36 npoints = 0; 37 bounds = null; 38 } 39 public void invalidate() { 40 bounds = null; 41 } 42 public void translate(int deltaX, int deltaY) { 43 } 45 public void addPoint(int x, int y) { 46 } 48 public Rectangle getBounds() { 49 return getBoundingBox(); 50 } 51 public Rectangle getBoundingBox() { 52 return null; 53 } 54 public boolean contains(Point p) { 55 return contains(p.x, p.y); 56 } 57 public boolean contains(int x, int y) { 58 return contains((double) x, (double) y); 59 } 60 public boolean inside(int x, int y) { 61 return contains((double) x, (double) y); 62 } 63 public Rectangle2D getBounds2D() { 64 return getBounds(); 65 } 66 public boolean contains(double x, double y) { 67 return false; 69 } 70 71 public boolean contains(Point2D p) { 72 return false; 74 } 75 public boolean intersects(double x, double y, double w, double h) { 76 return false; 78 } 79 public boolean intersects(Rectangle2D r) { 80 return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight()); 81 } 82 public boolean contains(double x, double y, double w, double h) { 83 return false; 85 } 86 public boolean contains(Rectangle2D r) { 87 return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight()); 88 } 89 public PathIterator getPathIterator(AffineTransform at) { 90 return null; 91 } 92 public PathIterator getPathIterator(AffineTransform at, double flatness) { 93 return null; 94 } 95 } | Popular Tags |