Package org.fonteditor.elements.paths

Examples of org.fonteditor.elements.paths.FEPath


      do {
        FEPointList fepl_of_glyph = glyph.getFEPointList(gdo);
        index_current = getIndexOfNextMatchingPoint(fepl_of_glyph, index_current, old_pos, pvg);
        if (index_current >= 0) {
          FEPath path = glyph.getFEPathList(gdo).getPath(fepl_of_glyph.getPoint(index_current));
          FEPointList fepl = path.getFEPointList();
          FEPoint point = fepl_of_glyph.getPoint(index_current);
          int index_on_path = fepl.getIndexOf(point);
          if (index_on_path >= 0) {

            int min_index = getIndexOfNextSlider(fepl, index_on_path, s_m, -1, pvg);
View Full Code Here


              FEPoint fep2 = fepointlist.getPoint(idx_p2);

              if (fep1.squaredDistanceFrom(fep2) < SPRING_THRESHOLD_SQUARED) {
                // is it headed outwards from point 1?
                LocalPathAndIndex loc1 = findLocalPathAndIndex(fep1);
                FEPath path1 = loc1.getPath();
                int index1 = loc1.getIndex();
                FEPoint fep1_plus = path1.safelyGetPoint(index1 + 1);
                FEPoint fep1_minus = path1.safelyGetPoint(index1 - 1);
                if (isClockwise(fep1, fep2, fep1_plus, fep1_minus)) {
                  // is it headed outwards from point 2?
                  LocalPathAndIndex loc2 = findLocalPathAndIndex(fep2);
                  FEPath path2 = loc2.getPath();
                  int index2 = loc2.getIndex();
                  FEPoint fep2_plus = path2.safelyGetPoint(index2 + 1);
                  FEPoint fep2_minus = path2.safelyGetPoint(index2 - 1);
                  if (isClockwise(fep2, fep1, fep2_plus, fep2_minus)) {
                    add(fep1, fep2);
                  }
                }
              }
View Full Code Here

    int dir = rnd.nextBoolean() ? -1 : 1;
    boolean flipped = false;
    FEPoint p1 = fepointlist.getPoint(idx_p1);
    FEPoint p2 = fepointlist.getPoint(idx_p2);
    int max = p1.squaredDistanceFrom(p2);
    FEPath path = fepathlist.getPath(p2);
    FEPointList fepl = path.getFEPointList();

    idx_p2 = fepl.getIndexOf(p2);
    for (; true;) {
      int new_idx_p2 = idx_p2 + dir;
View Full Code Here

  }

  LocalPathAndIndex findLocalPathAndIndex(final FEPoint fepoint) {
    return (LocalPathAndIndex) fepathlist.executeOnEachPath(new CallBackWithReturn() {
      public Object callback(Object o) {
        FEPath fepath = (FEPath) o;
        if (fepath.contains(fepoint)) {
          return new LocalPathAndIndex(fepath, fepath.indexOf(fepoint));
        }

        return null;
      }
    });
View Full Code Here

  }

  private void invalidatePolygons() {
    fepathlist.executeOnEachPath(new CallBack() {
      public void callback(Object o) {
        FEPath p = (FEPath) o;

        p.invalidatePolygons();
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.fonteditor.elements.paths.FEPath

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.