Package plotter.internal

Examples of plotter.internal.RangeSet


    }
    long bucket = (long) ((inx.get(0) - offset) / scale);
    double nextx = (bucket + 1) * scale + offset;
    int i = 0;
    double oldy = Double.NaN;
    RangeSet r = new RangeSet();
    long bucketSize = 0;
    double firsty = Double.NaN;
    while(true) {
      double x = inx.get(i);
      double y = iny.get(i);
      if(x >= nextx) {
        double bucketx = bucket * scale + offset;
        flushBucket(output, bucketx, firsty, r, oldy, bucketSize);
        r.clear();
        bucket = (int) ((x - offset) / scale);
        nextx = (bucket + 1) * scale + offset;
        bucketSize = 0;
        firsty = y;
        if(!Double.isNaN(y)) {
          r.add(y, y);
        }
      } else {
        if(bucketSize == 0) {
          firsty = y;
        }
        if(!Double.isNaN(y)) {
          if(Double.isNaN(oldy)) {
            r.add(y, y);
          } else {
            double min, max;
            if(oldy > y) {
              max = oldy;
              min = y;
            } else {
              max = y;
              min = oldy;
            }
            r.add(min, max);
          }
        }
      }
      oldy = y;
      i++;
View Full Code Here

TOP

Related Classes of plotter.internal.RangeSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.