Examples of quadTo()


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

    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

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

    }

    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

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

                    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

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

    public void createBasicFigure() {
        FigureLayer layer = graphicsPane.getForegroundLayer();
        GeneralPath path = new GeneralPath();
        path.moveTo(120, 240);
        path.lineTo(240, 240);
        path.quadTo(180, 120, 120, 240);
        path.closePath();

        Figure semi = new BasicFigure(path, Color.green);
        layer.add(semi);
    }
View Full Code Here

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

    // Fill background
    GeneralPath clipTop = new GeneralPath();
    clipTop.moveTo(0, 0);
    clipTop.lineTo(width, 0);
    clipTop.lineTo(width, height / 2);
    clipTop.quadTo(width / 2, height / 4, 0, height / 2);
    clipTop.lineTo(0, 0);

    rgraphics.setClip(clipTop);
    LinearGradientPaint gradientTop = new LinearGradientPaint(0, 0, width,
        0, new float[] { 0.0f, 0.5f, 1.0f }, new Color[] {
View Full Code Here

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

    GeneralPath clipBottom = new GeneralPath();
    clipBottom.moveTo(0, height);
    clipBottom.lineTo(width, height);
    clipBottom.lineTo(width, height / 2);
    clipBottom.quadTo(width / 2, height / 4, 0, height / 2);
    clipBottom.lineTo(0, height);

    rgraphics.setClip(clipBottom);
    LinearGradientPaint gradientBottom = new LinearGradientPaint(0, 0,
        width, 0, new float[] { 0.0f, 0.5f, 1.0f }, new Color[] {
View Full Code Here

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

    rgraphics.setPaint(gradientBottom);
    rgraphics.fillRect(0, 0, width, height);

    GeneralPath mid = new GeneralPath();
    mid.moveTo(width, height / 2);
    mid.quadTo(width / 2, height / 4, 0, height / 2);
    // rgraphics.setClip(new Rectangle(0, 0, width / 2, height));
    // rgraphics
    // .setClip(new Rectangle(width / 2, 0, width - width / 2, height));
    rgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

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

        System.out.println("Point at 3000 = " + pl.pointAtLength(3000f));

        path = new GeneralPath();
        path.moveTo(100f, 100f);
        path.lineTo(200f, 150f);
        path.quadTo(450f, 525f, 400f, 250f);
        path.closePath();
        pl = new PathLength(path);

        System.out.println("Path Length = " + pl.lengthOfPath());
        System.out.println("Point at 0 = " + pl.pointAtLength(0f));
View Full Code Here

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

        System.out.println("Point at 300 = " + pl.pointAtLength(300f));

        path = new GeneralPath();
        path.moveTo(100f, 100f);
        path.lineTo(200f, 150f);
        path.quadTo(450f, 525f, 400f, 250f);
        path.lineTo(300f, 200f);
        path.closePath();

        pl = new PathLength(path);
        System.out.println("Path Length = " + pl.lengthOfPath());
View Full Code Here

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

    public void render(int w, int h, Graphics2D g2) {
        GeneralPath p = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
        p.moveTo(w*.2f, h*.25f);
        p.curveTo(w*.4f, h*.5f, w*.6f, 0.0f, w*.8f, h*.25f);
        p.moveTo(w*.2f, h*.6f);
        p.quadTo(w*.5f, h*1.0f, w*.8f, h*.6f);
        g2.setColor(LIGHT_GRAY);
        g2.fill(p);
        g2.setColor(BLACK);
        g2.draw(p);
        g2.drawString("curveTo", (int) (w*.2), (int) (h*.25f)-5);
 
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.