Java Draw Bezier Curve drawBezier(Graphics2D g, float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2, float ctrly2, float x2, float y2)

Here you can find the source of drawBezier(Graphics2D g, float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2, float ctrly2, float x2, float y2)

Description

draw Bezier

License

Open Source License

Declaration

public static void drawBezier(Graphics2D g, float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2,
            float ctrly2, float x2, float y2) 

Method Source Code

//package com.java2s;
/*//  www .ja v a 2 s .c  om
 * PortUtil.cs
 * Copyright ? 2009-2011 kbinani
 *
 * This file is part of org.kbinani.
 *
 * org.kbinani is free software; you can redistribute it and/or
 * modify it under the terms of the BSD License.
 *
 * org.kbinani is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

import java.awt.Graphics2D;

import java.awt.geom.CubicCurve2D;

public class Main {
    public static void drawBezier(Graphics2D g, float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2,
            float ctrly2, float x2, float y2) {
        g.draw(new CubicCurve2D.Float(x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2));
    }
}

Related

  1. drawBezier(Graphics2D g2, @Nonnull Point2D p0, @Nonnull Point2D p1, @Nonnull Point2D p2, @Nonnull Point2D p3)
  2. drawBezierCurve(AffineTransform affine, Vector gPathPoints, Graphics g)