Package java.awt.geom

Examples of java.awt.geom.GeneralPath.closePath()


    GeneralPath path = new GeneralPath();
    path.moveTo(points [0][0], points [0][1]);
    for (int i = 1; i < points.length; i++) {
      path.lineTo(points [i][0], points [i][1]);
    }
    path.closePath();
    return path;
  }

  /**
   * Returns the path matching a given area.
View Full Code Here


          GeneralPath path = new GeneralPath();
          path.moveTo(points [0][0], points [0][1]);
          for (int i = 1; i < points.length; i++) {
            path.lineTo(points [i][0], points [i][1]);
          }
          path.closePath();
          return new Area(path);
        }
      };
    for (Room room : this.home.getRooms()) {
      room.addPropertyChangeListener(this.roomChangeListener);
View Full Code Here

      GeneralPath roomShape = new GeneralPath();
      roomShape.moveTo(this.points [0][0], this.points [0][1]);
      for (int i = 1; i < this.points.length; i++) {
        roomShape.lineTo(this.points [i][0], this.points [i][1]);
      }
      roomShape.closePath();
      // Cache roomShape
      this.shapeCache = roomShape;
    }
    return this.shapeCache;
  }
View Full Code Here

    GeneralPath wallPath = new GeneralPath();
    wallPath.moveTo(wallPoints [0][0], wallPoints [0][1]);
    for (int i = 1; i < wallPoints.length; i++) {
      wallPath.lineTo(wallPoints [i][0], wallPoints [i][1]);
    }
    wallPath.closePath();
    return wallPath;
  }
 
  /**
   * Returns a clone of the <code>walls</code> list. All existing walls
View Full Code Here

    GeneralPath path = new GeneralPath();
    path.moveTo(points [0][0], points [0][1]);
    for (int i = 1; i < points.length; i++) {
      path.lineTo(points [i][0], points [i][1]);
    }
    path.closePath();
    return path;
  }

  /**
   * Sets rectangle selection feedback coordinates.
View Full Code Here

          GeneralPath needlePath = new GeneralPath();
          needlePath.moveTo(0, -0.75f);
          needlePath.lineTo(0.2f, 0.7f);
          needlePath.lineTo(0, 0.5f);
          needlePath.lineTo(-0.2f, 0.7f);
          needlePath.closePath();
          needlePath.moveTo(-0.02f, 0);
          needlePath.lineTo(0.02f, 0);
          g2D.setStroke(new BasicStroke(4 / getWidth()));
          g2D.draw(needlePath);
        }
View Full Code Here

      GeneralPath generalPath = new GeneralPath(GeneralPath.WIND_NON_ZERO, surroundingPolygon.length);
      generalPath.moveTo(surroundingPolygon [0][0], surroundingPolygon [0][1]);
      for (int i = 0; i < surroundingPolygon.length; i++) {
        generalPath.lineTo(surroundingPolygon [i][0], surroundingPolygon [i][1]);
      }
      generalPath.closePath();
      modelAreaOnFloor = new Area(generalPath);
    }
    return modelAreaOnFloor;
  }
 
View Full Code Here

    GeneralPath path = new GeneralPath();
    path.moveTo(points [0][0], points [0][1]);
    for (int i = 1; i < points.length; i++) {
      path.lineTo(points [i][0], points [i][1]);
    }
    path.closePath();
    return path;
  }
 
  /**
   * Returns a shared material instance matching the given color.
View Full Code Here

    graphics.quadTo(edgeCntrl1.x,edgeCntrl1.y,end.x,end.y);
    graphics.quadTo(edgeCntrl2.x,edgeCntrl2.y,edge2.x,edge2.y);
    graphics.lineTo(inter2.x,inter2.y);
    graphics.lineTo(start2.x,start2.y);
    graphics.lineTo(start1.x,start1.y);
    graphics.closePath();
   
    int[] rules = new int[8];
   
    //all possible Compositing Rules:
    rules[0] = AlphaComposite.SRC_OVER;
View Full Code Here

         coordinates[2], coordinates[3],
         coordinates[4], coordinates[5]);
              break;

    case PathIterator.SEG_CLOSE:
        path.closePath();
              break;
    default:
        break;
      }
  }
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.