Package java.awt.geom

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


   
    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


                    break;
                case PathIterator.SEG_LINETO:
                    p.lineTo(points[j], points[j + 1]);
                    break;
                case PathIterator.SEG_QUADTO:
                    p.quadTo(points[j], points[j + 1], points[j + 2], points[j + 3]);
                    break;
                case PathIterator.SEG_CUBICTO:
                    p.curveTo(points[j], points[j + 1], points[j + 2], points[j + 3], points[j + 4], points[j + 5]);
                    break;
                case PathIterator.SEG_CLOSE:
View Full Code Here

        layer.add(_circle);

        GeneralPath path = new GeneralPath();
        path.moveTo(120, 240);
        path.lineTo(240, 240);
        path.quadTo(180, 120, 120, 240);
        path.closePath();
        _shape = new BasicFigure(path, Color.red);
        layer.add(_shape);

        Polyline2D poly = new Polyline2D.Double();
View Full Code Here

        graphics.setTransform(AffineTransform.getRotateInstance(2.0
            * Math.PI * Math.random(), xc, yc));

        GeneralPath bean = new GeneralPath();
        bean.moveTo(xc - r, yc - 0.1f * r);
        bean.quadTo(xc - r, yc - 0.6f * r, xc, yc - 0.6f * r);
        bean.quadTo(xc + r, yc - 0.6f * r, xc + r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc + 0.1f * r);
        bean.quadTo(xc + r, yc + 0.6f * r, xc, yc + 0.6f * r);
        bean.quadTo(xc - r, yc + 0.6f * r, xc - r, yc + 0.1f * r);
        bean.lineTo(xc - r, yc - 0.1f * r);
 
View Full Code Here

            * Math.PI * Math.random(), xc, yc));

        GeneralPath bean = new GeneralPath();
        bean.moveTo(xc - r, yc - 0.1f * r);
        bean.quadTo(xc - r, yc - 0.6f * r, xc, yc - 0.6f * r);
        bean.quadTo(xc + r, yc - 0.6f * r, xc + r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc + 0.1f * r);
        bean.quadTo(xc + r, yc + 0.6f * r, xc, yc + 0.6f * r);
        bean.quadTo(xc - r, yc + 0.6f * r, xc - r, yc + 0.1f * r);
        bean.lineTo(xc - r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc - 0.1f * r);
 
View Full Code Here

        GeneralPath bean = new GeneralPath();
        bean.moveTo(xc - r, yc - 0.1f * r);
        bean.quadTo(xc - r, yc - 0.6f * r, xc, yc - 0.6f * r);
        bean.quadTo(xc + r, yc - 0.6f * r, xc + r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc + 0.1f * r);
        bean.quadTo(xc + r, yc + 0.6f * r, xc, yc + 0.6f * r);
        bean.quadTo(xc - r, yc + 0.6f * r, xc - r, yc + 0.1f * r);
        bean.lineTo(xc - r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc + 0.1f * r);
        bean.lineTo(xc - r, yc + 0.1f * r);
 
View Full Code Here

        bean.moveTo(xc - r, yc - 0.1f * r);
        bean.quadTo(xc - r, yc - 0.6f * r, xc, yc - 0.6f * r);
        bean.quadTo(xc + r, yc - 0.6f * r, xc + r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc + 0.1f * r);
        bean.quadTo(xc + r, yc + 0.6f * r, xc, yc + 0.6f * r);
        bean.quadTo(xc - r, yc + 0.6f * r, xc - r, yc + 0.1f * r);
        bean.lineTo(xc - r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc - 0.1f * r);
        bean.lineTo(xc + r, yc + 0.1f * r);
        bean.lineTo(xc - r, yc + 0.1f * r);
        graphics.draw(bean);
 
View Full Code Here

    result.moveTo(radius + xs, ys);

    if ((xe - radius) >= radius) {
      result.lineTo(xe - radius, ys);
    }
    result.quadTo(xe - radius3, xs + radius3, xe, xs + radius);

    float h2 = (ye - 1.0f) / 2.0f;
    if (h2 >= radius) {
      result.lineTo(xe, h2);
    }
View Full Code Here

    }

    if ((height - radius - 1) >= radius) {
      result.lineTo(xs, radius + ys);
    }
    result.quadTo(xs + radius3, ys + radius3, xs + radius, ys);

    return result;
  }
}
View Full Code Here

                    p.lineTo(_coordinate[c], _coordinate[c + 1]);
                    c += 2;
                    break;

                case PathIterator.SEG_QUADTO:
                    p.quadTo(_coordinate[c], _coordinate[c + 1],
                            _coordinate[c + 2], _coordinate[c + 3]);
                    c += 4;
                    break;

                case PathIterator.SEG_CUBICTO:
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.