home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / awt / Polygon$PolygonPathIterator.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.1 KB  |  59 lines

  1. package java.awt;
  2.  
  3. import java.awt.geom.AffineTransform;
  4. import java.awt.geom.PathIterator;
  5.  
  6. class Polygon$PolygonPathIterator implements PathIterator {
  7.    Polygon poly;
  8.    AffineTransform transform;
  9.    int index;
  10.    // $FF: synthetic field
  11.    private final Polygon this$0;
  12.  
  13.    public Polygon$PolygonPathIterator(Polygon var1, Polygon var2, AffineTransform var3) {
  14.       this.this$0 = var1;
  15.       this.poly = var2;
  16.       this.transform = var3;
  17.    }
  18.  
  19.    public int getWindingRule() {
  20.       return 0;
  21.    }
  22.  
  23.    public boolean isDone() {
  24.       return this.index > this.poly.npoints;
  25.    }
  26.  
  27.    public void next() {
  28.       ++this.index;
  29.    }
  30.  
  31.    public int currentSegment(float[] var1) {
  32.       if (this.index >= this.poly.npoints) {
  33.          return 4;
  34.       } else {
  35.          var1[0] = (float)this.poly.xpoints[this.index];
  36.          var1[1] = (float)this.poly.ypoints[this.index];
  37.          if (this.transform != null) {
  38.             this.transform.transform(var1, 0, var1, 0, 1);
  39.          }
  40.  
  41.          return this.index == 0 ? 0 : 1;
  42.       }
  43.    }
  44.  
  45.    public int currentSegment(double[] var1) {
  46.       if (this.index >= this.poly.npoints) {
  47.          return 4;
  48.       } else {
  49.          var1[0] = (double)this.poly.xpoints[this.index];
  50.          var1[1] = (double)this.poly.ypoints[this.index];
  51.          if (this.transform != null) {
  52.             this.transform.transform(var1, 0, var1, 0, 1);
  53.          }
  54.  
  55.          return this.index == 0 ? 0 : 1;
  56.       }
  57.    }
  58. }
  59.