Examples of intersect()


Examples of java.awt.geom.Area.intersect()

          s = stroke.createStrokedShape(s);
      }
      s = transform.createTransformedShape(s);
      Area area = new Area(s);
      if (clip != null)
          area.intersect(clip);
      return area.intersects(rect.x, rect.y, rect.width, rect.height);
  }

  /**
   * This initialises the stream by saving the current graphics state, and
View Full Code Here

Examples of java.awt.geom.Area.intersect()

              Area newArea = getArea((float [][])ev.getNewValue());
              for (Room room : home.getRooms()) {
                if (room != ev.getSource()) {
                  Area roomAreaIntersectionWithOldArea = getArea(room.getPoints());
                  Area roomAreaIntersectionWithNewArea = new Area(roomAreaIntersectionWithOldArea);
                  roomAreaIntersectionWithNewArea.intersect(newArea);                 
                  if (!roomAreaIntersectionWithNewArea.isEmpty()) {
                    updateObjects(Arrays.asList(new Room [] {room}));
                  } else {
                    roomAreaIntersectionWithOldArea.intersect(oldArea);
                    if (!roomAreaIntersectionWithOldArea.isEmpty()) {
View Full Code Here

Examples of java.awt.geom.Area.intersect()

    for (HomePieceOfFurniture piece : getVisibleDoorsAndWindows(this.home.getFurniture())) {
      if (piece.getElevation() < maxWallHeight) {
        Shape pieceShape = getShape(piece.getPoints());
        Area pieceArea = new Area(pieceShape);
        Area intersectionArea = new Area(wallShape);
        intersectionArea.intersect(pieceArea);
        if (!intersectionArea.isEmpty()) {
          windowIntersections.add(new DoorOrWindowArea(intersectionArea, Arrays.asList(new HomePieceOfFurniture [] {piece})));
          // Remove from wall area the piece shape
          wallArea.subtract(pieceArea);
        }
View Full Code Here

Examples of java.awt.geom.Area.intersect()

        for (DoorOrWindowArea otherWindowIntersection : windowIntersections) {         
          if (windowIntersection.getArea().isEmpty()) {
            break;
          } else if (otherWindowIndex > windowIndex) { // Avoid search twice the intersection between two items
            Area windowsIntersectionArea = new Area(otherWindowIntersection.getArea());
            windowsIntersectionArea.intersect(windowIntersection.getArea());
            if (!windowsIntersectionArea.isEmpty()) {
              // Remove intersection from wall area             
              otherWindowIntersection.getArea().subtract(windowsIntersectionArea);             
              windowIntersection.getArea().subtract(windowsIntersectionArea);
              // Create a new area for the intersection
View Full Code Here

Examples of java.awt.geom.Area.intersect()

            }
            if (intersectionCount == 2
                && doorPoints.length == 4) {
              // Find the intersection of the door with home walls
              Area wallsDoorIntersection = new Area(getWallsArea());
              wallsDoorIntersection.intersect(new Area(getPath(doorPoints)));
              // Reduce the size of intersection to its half
              float [][] intersectionPoints = getPathPoints(getPath(wallsDoorIntersection), false);
              Shape halfDoorPath = null;
              if (intersectionPoints.length == 4) {
                float epsilon = 0.05f;
View Full Code Here

Examples of java.awt.geom.Area.intersect()

            Area a3 = new Area((p3));

            // uniao a1, a2 e a3
            Area a123 = new Area(a1);
            a123.intersect(a2);
            a123.intersect(a3);
            MyArea ma123 = new MyArea(a123, cores[0] + cores[1] + cores[2]);
            ma123.calculateArea("a123");

            // uniao a1 e a2
View Full Code Here

Examples of java.awt.geom.Area.intersect()

            Area a3 = new Area((p3));

            // uniao a1, a2 e a3
            Area a123 = new Area(a1);
            a123.intersect(a2);
            a123.intersect(a3);
            MyArea ma123 = new MyArea(a123, cores[0] + cores[1] + cores[2]);
            ma123.calculateArea("a123");

            // uniao a1 e a2
            Area a12 = new Area(a1);
View Full Code Here

Examples of java.awt.geom.Area.intersect()

            MyArea ma123 = new MyArea(a123, cores[0] + cores[1] + cores[2]);
            ma123.calculateArea("a123");

            // uniao a1 e a2
            Area a12 = new Area(a1);
            a12.intersect(a2);
            a12.subtract(a3);
            MyArea ma12 = new MyArea(a12, cores[0] + cores[1]);
            ma12.calculateArea("a12");

            // uniao a1 e a3
View Full Code Here

Examples of java.awt.geom.Area.intersect()

            MyArea ma12 = new MyArea(a12, cores[0] + cores[1]);
            ma12.calculateArea("a12");

            // uniao a1 e a3
            Area a13 = new Area(a1);
            a13.intersect(a3);
            a13.subtract(a2);
            MyArea ma13 = new MyArea(a13, cores[2] + cores[0]);
            ma13.calculateArea("a13");

            // uniao a1 e a3
View Full Code Here

Examples of java.awt.geom.Area.intersect()

            MyArea ma13 = new MyArea(a13, cores[2] + cores[0]);
            ma13.calculateArea("a13");

            // uniao a1 e a3
            Area a23 = new Area(a2);
            a23.intersect(a3);
            a23.subtract(a1);
            MyArea ma23 = new MyArea(a23, cores[1] + cores[2]);
            ma23.calculateArea("a23");

            // fix its area
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.