Examples of CrossingHelper


Examples of org.apache.harmony.awt.geom.CrossingHelper

    this.coordsSize = resultCoordPos;
    this.rulesSize = resultRulesPos;
  }

    private void addPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] {coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (area.contains(getBounds2D())) {
        copy(area, this);
      } else if (!contains(area.getBounds2D())) {
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    coordsSize = resultCoordPos;
    rulesSize = resultRulesPos;
  }

  private void intersectPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] { coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (contains(area.getBounds2D())) {
        copy(area, this);
      } else if (!area.contains(getBounds2D())) {
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    coordsSize = resultCoordPos;
    rulesSize = resultRulesPos;
  }

  private void subtractPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] { coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
        if (contains(area.getBounds2D())) {
            copy(area, this);
            return;
      }
        return;
    }

        double[] resultCoords = new double[2 * (coordsSize + area.coordsSize +
                                                       intersectPoints.length)];
        int[] resultRules = new int[2 * (rulesSize + area.rulesSize +
                                                       intersectPoints.length)];
        int[] resultOffsets = new int[2 * (rulesSize + area.rulesSize +
                                                       intersectPoints.length)];
        int resultCoordPos = 0;
        int resultRulesPos = 0;
        boolean isCurrentArea = true;
        int countPoints = 0;
        boolean curArea = false;
        boolean addArea = false;

        IntersectPoint point = intersectPoints[0];
        resultRules[resultRulesPos] = PathIterator.SEG_MOVETO;
        resultOffsets[resultRulesPos++] = resultCoordPos;
       
        do {
          resultCoords[resultCoordPos++] = point.getX();
            resultCoords[resultCoordPos++] = point.getY();
            resultRules[resultRulesPos] = PathIterator.SEG_LINETO;
            resultOffsets[resultRulesPos++] = resultCoordPos - 2;
            int curIndex = point.getEndIndex(true);
           
            if ((curIndex < 0) ||
                (area.isVertex(coords[2 * curIndex], coords[2 * curIndex + 1]) &&
                     crossHelper.containsPoint(new double[] {coords[2 * curIndex],
                                           coords[2 * curIndex + 1]}) &&
                (coords[2 * curIndex] != point.getX() ||
                   coords[2 * curIndex + 1] != point.getY()))) {
              isCurrentArea = !isCurrentArea;
            } else if (area.containsExact(coords[2 * curIndex],
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    this.coordsSize = resultCoordPos;
    this.rulesSize = resultRulesPos;
  }

    private void addPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] {coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (area.contains(getBounds2D())) {
        copy(area, this);
      } else if (!contains(area.getBounds2D())) {
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    coordsSize = resultCoordPos;
    rulesSize = resultRulesPos;
  }

  private void intersectPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] { coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (contains(area.getBounds2D())) {
        copy(area, this);
      } else if (!area.contains(getBounds2D())) {
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    coordsSize = resultCoordPos;
    rulesSize = resultRulesPos;
  }

  private void subtractPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] { coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if ((intersectPoints.length == 0) && (contains(area.getBounds2D()))) {
      copy(area, this);
      return;
    }
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    this.coordsSize = resultCoordPos;
    this.rulesSize = resultRulesPos;
  }

    private void addPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] {coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (area.contains(getBounds2D())) {
        copy(area, this);
      } else if (!contains(area.getBounds2D())) {
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    coordsSize = resultCoordPos;
    rulesSize = resultRulesPos;
  }

  private void intersectPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] { coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (contains(area.getBounds2D())) {
        copy(area, this);
      } else if (!area.contains(getBounds2D())) {
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    coordsSize = resultCoordPos;
    rulesSize = resultRulesPos;
  }

  private void subtractPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] { coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
        if (contains(area.getBounds2D())) {
            copy(area, this);
            return;
      }
        return;
    }

        double[] resultCoords = new double[2 * (coordsSize + area.coordsSize +
                                                       intersectPoints.length)];
        int[] resultRules = new int[2 * (rulesSize + area.rulesSize +
                                                       intersectPoints.length)];
        int[] resultOffsets = new int[2 * (rulesSize + area.rulesSize +
                                                       intersectPoints.length)];
        int resultCoordPos = 0;
        int resultRulesPos = 0;
        boolean isCurrentArea = true;
        int countPoints = 0;
        boolean curArea = false;
        boolean addArea = false;

        IntersectPoint point = intersectPoints[0];
        resultRules[resultRulesPos] = PathIterator.SEG_MOVETO;
        resultOffsets[resultRulesPos++] = resultCoordPos;
       
        do {
          resultCoords[resultCoordPos++] = point.getX();
            resultCoords[resultCoordPos++] = point.getY();
            resultRules[resultRulesPos] = PathIterator.SEG_LINETO;
            resultOffsets[resultRulesPos++] = resultCoordPos - 2;
            int curIndex = point.getEndIndex(true);
           
            if ((curIndex < 0) ||
                (area.isVertex(coords[2 * curIndex], coords[2 * curIndex + 1]) &&
                     crossHelper.containsPoint(new double[] {coords[2 * curIndex],
                                           coords[2 * curIndex + 1]}) &&
                (coords[2 * curIndex] != point.getX() ||
                   coords[2 * curIndex + 1] != point.getY()))) {
              isCurrentArea = !isCurrentArea;
            } else if (area.containsExact(coords[2 * curIndex],
View Full Code Here

Examples of org.apache.harmony.awt.geom.CrossingHelper

    this.coordsSize = resultCoordPos;
    this.rulesSize = resultRulesPos;
  }

    private void addPolygon(Area area) {
    CrossingHelper crossHelper = new CrossingHelper(new double[][] {coords,
                                                area.coords },
                                                new int[] {coordsSize,
                                                area.coordsSize });
    IntersectPoint[] intersectPoints = crossHelper.findCrossing();

    if (intersectPoints.length == 0) {
      if (area.contains(getBounds2D())) {
        copy(area, this);
      } else if (!contains(area.getBounds2D())) {
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.