Package java.awt.geom.Point2D

Examples of java.awt.geom.Point2D.Double


  public void drawLifeLine(double vEnd) {
   
    SVGAttributeKeys.STROKE_COLOR.set(lifeline, SVGConstants.DEFAULT_LIFELINE_STROKE_COLOR);
    SVGAttributeKeys.STROKE_OPACITY.set(lifeline, SVGConstants.DEFAULT_LIFELINE_OPACITY);
    SVGAttributeKeys.STROKE_DASHES.set(lifeline, SVGConstants.DEFAULT_LIFELINE_DASHES);
    Double lifelineStartPosition = new Double();
    lifelineStartPosition.x = getLifelineHPos();
    lifelineStartPosition.y = instanceBox.getBounds().height;
    Double lifelineEndPosition = new Double();
    lifelineEndPosition.x = lifelineStartPosition.x;
    lifelineEndPosition.y = vEnd;
    BezierFigure pathFigure = new BezierFigure();
    pathFigure.addNode(new BezierPath.Node(lifelineStartPosition));
    pathFigure.addNode(new BezierPath.Node(lifelineEndPosition));
View Full Code Here


      double targetHPosition = (target != null) ? target
          .getLifelineHPos() : SVGConstants.DIAGRAM_ORIGIN_X;
      double length = targetHPosition - callerHPosition;

      SVGPathFigure interactionLine = new SVGPathFigure();
      Double interactionLineStartPosition = new Double();
      interactionLineStartPosition.x = 0;
      interactionLineStartPosition.y = 0;

      BezierFigure linePath = new BezierFigure();
      linePath.addNode(new BezierPath.Node(interactionLineStartPosition));

      boolean selfCall = caller == target;

      if (selfCall) {
        Double selfCallIntermidiateTopPosition = new Double();
        length = heightIncrement;
        selfCallIntermidiateTopPosition.x = interactionLineStartPosition.x
            + length;
        selfCallIntermidiateTopPosition.y = interactionLineStartPosition.y;
        linePath.addNode(new BezierPath.Node(
            selfCallIntermidiateTopPosition));
        Double selfCallIntermidiateBottomPosition = new Double();
        height = heightIncrement;
        selfCallIntermidiateBottomPosition.x = interactionLineStartPosition.x
            + length;
        selfCallIntermidiateBottomPosition.y = interactionLineStartPosition.y
            + height;
        linePath.addNode(new BezierPath.Node(
            selfCallIntermidiateBottomPosition));
        length = 0;
      }

      Double interacitonlineEndPosition = new Double();
      interacitonlineEndPosition.x = interactionLineStartPosition.x
          + length;
      interacitonlineEndPosition.y = interactionLineStartPosition.y
          + height;
View Full Code Here

    if (offset != null){  // correct offset it required
      output = new PointImpl(output.getX()-offset.getX(),output.getY()-offset.getY());
    }
    if (proj != null){
      // magic
      Double projout = new Double();
      proj.inverseTransform(new Double(output.getX(),output.getY()), projout);
      output = new PointImpl(projout.x,projout.y);
    }
    return output;
  }
View Full Code Here

 
  public Point transform(Point input){
    PointImpl output = new PointImpl(input.getX(),input.getY());
    if (proj != null){
      // magic
      Double projout = new Double();
      proj.transform(new Double(output.getX(),output.getY()), projout);
      output = new PointImpl(projout.x,projout.y);
    }
    if (offset != null){  // correct offset it required
      output = new PointImpl(output.getX()+offset.getX(),output.getY()+offset.getY());
    }
View Full Code Here

 
  public Point transform(double lon, double lat){
    PointImpl output = new PointImpl(lon, lat);
    if (proj != null){
      // magic
      Double projout = new Double();
      proj.transform(new Double(lon,lat), projout);
      output = new PointImpl(projout.x,projout.y);
    }
    if (offset != null){  // correct offset it required
      output = new PointImpl(output.getX()+offset.getX(),output.getY()+offset.getY());
    }
View Full Code Here

        RasterInfo pyramid = new RasterInfo(1L, 1013, 1021);

        final CoordinateReferenceSystem crs = DefaultEngineeringCRS.CARTESIAN_2D;

        final Point imageOffset = new Point(0, 0);
        final Point2D extentOffset = new Double(0, 0);

        pyramid.addPyramidLevel(0, new ReferencedEnvelope(0, 2026, 0, 2042, crs), imageOffset,
                extentOffset, 17, 17, new Dimension(1013, 1021));
        pyramid.addPyramidLevel(1, new ReferencedEnvelope(0, 2026.0000000000002, 0, 2042, crs),
                imageOffset, extentOffset, 9, 9, new Dimension(507, 511));
View Full Code Here

TOP

Related Classes of java.awt.geom.Point2D.Double

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.