Examples of pointCount()


Examples of research.connection.LineConnection.pointCount()

     * }
     */

    public Point locate() {
        LineConnection line = ownerConnection();
        int segment = Math.min(fSegment, line.pointCount() - 2);
        Point p1 = line.pointAt(segment);
        Point p2 = line.pointAt(segment + 1);
        return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
    }

View Full Code Here

Examples of research.connection.LineConnection.pointCount()

        r2width = end.width - i2.left - i2.right - 1;

        if (fSegment == 0) {
            x = Geom.range(r1x, r1x + r1width, x);
        }
        if (fSegment == line.pointCount() - 2) {
            x = Geom.range(r2x, r2x + r2width, x);
        }
        return x;
    }
View Full Code Here

Examples of research.connection.LineConnection.pointCount()

        r2height = end.height - i2.top - i2.bottom - 1;

        if (fSegment == 0) {
            y = Geom.range(r1y, r1y + r1height, y);
        }
        if (fSegment == line.pointCount() - 2) {
            y = Geom.range(r2y, r2y + r2height, y);
        }
        return y;
    }
View Full Code Here

Examples of research.connection.LineConnection.pointCount()

        }
    }

    public Point locate() {
        LineConnection line = ownerConnection();
        int segment = Math.min(fSegment, line.pointCount() - 2);
        Point p1 = line.pointAt(segment);
        Point p2 = line.pointAt(segment + 1);
        return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
    }
View Full Code Here

Examples of research.connection.LineConnection.pointCount()

        r2width = end.width - i2.left - i2.right - 1;

        if (fSegment == 0) {
            x = Geom.range(r1x, r1x + r1width, x);
        }
        if (fSegment == line.pointCount() - 2) {
            x = Geom.range(r2x, r2x + r2width, x);
        }
        return x;
    }
View Full Code Here

Examples of research.connection.LineConnection.pointCount()

        r2height = end.height - i2.top - i2.bottom - 1;

        if (fSegment == 0) {
            y = Geom.range(r1y, r1y + r1height, y);
        }
        if (fSegment == line.pointCount() - 2) {
            y = Geom.range(r2y, r2y + r2height, y);
        }
        return y;
    }
View Full Code Here

Examples of research.figure.PolyLineFigure.pointCount()

  }

  public Point locate(Figure owner) {
    PolyLineFigure plf = (PolyLineFigure)owner;
    // guard against changing PolyLineFigures -> temporary hack
    if (fIndex < plf.pointCount()) {
      return ((PolyLineFigure)owner).pointAt(fIndex);
    }
    return new Point(0, 0);
  }
}
View Full Code Here

Examples of research.figure.PolyLineFigure.pointCount()

    int cy = -1;
    long len = Long.MAX_VALUE;

    // Try for points along edge

    for (int i = 0; i < p.pointCount()-1; i++) {
      Point p1 = p.pointAt(i);
      Point p2 = p.pointAt(i+1);
      Point chop = Geom.intersect(p1.x,
                 p1.y,
                 p2.x,
View Full Code Here

Examples of research.figure.PolyLineFigure.pointCount()

      }
    }
    // if none found, pick closest vertex
    //if (len ==  Long.MAX_VALUE) {
    { // try anyway
      for (int i = 0; i < p.pointCount(); i++) {
        Point pp = p.pointAt(i);
        long l = Geom.length2(pp.x, pp.y, from.x, from.y);
        if (l < len) {
          len = l;
          cx = pp.x;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.