Package java.awt.geom

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


          path.moveTo(segments[i].getX1(), segments[i].getY1());
          break;
        }
        case PathIterator.SEG_QUADTO:
        {
          path.quadTo(segments[i].getX1(), segments[i].getY1(),
              segments[i].getX2(), segments[i].getY2());
          break;
        }
        default:
          throw new IllegalStateException("Unexpected result from path iterator.");
View Full Code Here


    path.lineTo(-10, -20);
    pt.setLocation(-10, -20);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 6
    path.quadTo(1, 2, 3, 4);
    pt.setLocation(3, 4);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 7
    path.curveTo(5, 6, 7, 8, 9, 10);
View Full Code Here

    path.moveTo(50, 51);
    pt.setLocation(50, 51);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 10
    path.quadTo(52, 53, 54, 55);
    pt.setLocation(54, 55);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 11
    path.closePath();
View Full Code Here

    GeneralPath path;
    path = new GeneralPath();
    path.moveTo(1.1f, 1.2f);
    path.lineTo(2.1f, 2.2f);
    path.quadTo(3.1f, 3.2f, 4.1f, 4.2f);
    path.closePath();
    path.moveTo(5.1f, 5.2f);
    path.curveTo(6.1f, 6.2f, 7.1f, 7.2f, 8.1f, 8.2f);

  }
View Full Code Here

    path = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
    path.moveTo(10, 11);
    path.lineTo(20, 21);
    path.closePath();
    path.moveTo(30, 31);
    path.quadTo(40, 41, 42, 43);
    path.curveTo(50, 51, 52, 53, 54, 55);
   
    pit = path.getPathIterator(null);
    h.check(pit.getWindingRule(), PathIterator.WIND_EVEN_ODD); // 1
    h.check(!pit.isDone());                                    // 2
View Full Code Here

    path = new GeneralPath(GeneralPath.WIND_NON_ZERO);
    path.moveTo(10, 11);
    path.lineTo(20, 21);
    path.closePath();
    path.moveTo(30, 31);
    path.quadTo(40, 41, 42, 43);
    path.curveTo(50, 51, 52, 53, 54, 55);
   
    tx = new AffineTransform();
    tx.translate(2, 3);
    tx.scale(10, 10);
View Full Code Here

            final AffineTransform tx = new AffineTransform();
            tx.translate(50, h / 2);
            tx.scale(0.25, -0.25);
            final GeneralPath gp = new GeneralPath();
            gp.moveTo(w, 0);
            gp.quadTo(w, h, 0, h);
            gp.closePath();
            final Graphics2D g2d = (Graphics2D) g;
            g2d.draw(gp);
            g.setColor(Color.RED);
            drawQuadCurve(g, w, 0, w, h, 0, h);
View Full Code Here

      }*/
    } else if(point.getType() == ShapePoint.TYPE_ROUND){
      entryPoint = getCellEdgePointBetween(point, previous, diagram);
      exitPoint = getCellEdgePointBetween(point, next, diagram);
      path.moveTo(entryPoint.x, entryPoint.y);
      path.quadTo(point.x, point.y, exitPoint.x, exitPoint.y);     
    }

    for(int i = 1; i < size; i++){
      previous = point;
      point = (ShapePoint) getPoints().get(i);
View Full Code Here

      else if(point.getType() == ShapePoint.TYPE_ROUND){
        entryPoint = getCellEdgePointBetween(point, previous, diagram);
        exitPoint = getCellEdgePointBetween(point, next, diagram);

        path.lineTo(entryPoint.x, entryPoint.y);
        path.quadTo(point.x, point.y, exitPoint.x, exitPoint.y);
        //if(!isPointLinesEnd(next)){
          if(next.getType() == ShapePoint.TYPE_NORMAL)
            path.lineTo(next.x, next.y);
          else if(next.getType() == ShapePoint.TYPE_ROUND){
            entryPoint = getCellEdgePointBetween(next, point, diagram);
View Full Code Here

    //int controlDY = diagram.getCellHeight() / 2;
   
    int controlDX = bounds.width / 6;
    int controlDY = bounds.height / 8;
   
    path.quadTo(pointMid.x + controlDX, pointMid.y - controlDY, pointMid.x, pointMid.y);
    path.quadTo(pointMid.x - controlDX, pointMid.y + controlDY, point4.x, point4.y);
    path.closePath();
   
    return path;
  }
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.