Package java.awt.geom

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


   */
  private GeneralPath getPath(float [][] points) {
    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;
  }

View Full Code Here


      switch (it.currentSegment(point)) {
        case PathIterator.SEG_MOVETO :
          path.moveTo(point [0], point [1]);
          break;
        case PathIterator.SEG_LINETO :
          path.lineTo(point [0], point [1]);
          break;
      }
      it.next();
    }
    return path;
View Full Code Here

       
        private Area getArea(float [][] points) {
          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);
        }
      };
View Full Code Here

  private Shape getShape() {
    if (this.shapeCache == null) {
      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;
    }
View Full Code Here

  private Shape getShape() {
    float [][] wallPoints = getPoints();
    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;
  }
 
View Full Code Here

      float yStartAngle = (float)(0.9f * yScale * cos);
      float xEndAngle = (float)(2.2f * yScale * sin);
      float yEndAngle = (float)(2.2f * yScale * cos);
      GeneralPath cameraFieldOfViewAngle = new GeneralPath();
      cameraFieldOfViewAngle.moveTo(xStartAngle, yStartAngle);
      cameraFieldOfViewAngle.lineTo(xEndAngle, yEndAngle);
      cameraFieldOfViewAngle.moveTo(-xStartAngle, yStartAngle);
      cameraFieldOfViewAngle.lineTo(-xEndAngle, yEndAngle);
      g2D.draw(cameraFieldOfViewAngle);
      g2D.setTransform(previousTransform);
 
View Full Code Here

      float yEndAngle = (float)(2.2f * yScale * cos);
      GeneralPath cameraFieldOfViewAngle = new GeneralPath();
      cameraFieldOfViewAngle.moveTo(xStartAngle, yStartAngle);
      cameraFieldOfViewAngle.lineTo(xEndAngle, yEndAngle);
      cameraFieldOfViewAngle.moveTo(-xStartAngle, yStartAngle);
      cameraFieldOfViewAngle.lineTo(-xEndAngle, yEndAngle);
      g2D.draw(cameraFieldOfViewAngle);
      g2D.setTransform(previousTransform);
 
      // Paint resize indicator of selected camera
      if (selectedItems.size() == 1
View Full Code Here

   */
  private Shape getShape(float [][] points) {
    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;
  }

View Full Code Here

          g2D.draw(new Line2D.Float(0, -0.8f, 0, -0.7f));
          g2D.draw(new Line2D.Float(0, 0.85f, 0, 0.7f));
          // Draw a N
          GeneralPath path = new GeneralPath();
          path.moveTo(-0.1f, -0.8f);
          path.lineTo(-0.1f, -1f);
          path.lineTo(0.1f, -0.8f);
          path.lineTo(0.1f, -1f);
          g2D.setStroke(new BasicStroke(1.5f / getWidth()));
          g2D.draw(path);
          // Draw the needle
View Full Code Here

          g2D.draw(new Line2D.Float(0, 0.85f, 0, 0.7f));
          // Draw a N
          GeneralPath path = new GeneralPath();
          path.moveTo(-0.1f, -0.8f);
          path.lineTo(-0.1f, -1f);
          path.lineTo(0.1f, -0.8f);
          path.lineTo(0.1f, -1f);
          g2D.setStroke(new BasicStroke(1.5f / getWidth()));
          g2D.draw(path);
          // Draw the needle
          GeneralPath needlePath = new GeneralPath();
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.