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)
public static void drawBezier(Graphics2D g, float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2, float ctrly2, float x2, float y2)
//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)); } }