func CubicCurve(gc draw2d.GraphicContext, x, y, width, height float64) {
	sx, sy := width/162, height/205
	x0, y0 := x, y+sy*100.0
	x1, y1 := x+sx*75, y+sy*205
	x2, y2 := x+sx*125, y
	x3, y3 := x+sx*205, y+sy*100

	gc.SetStrokeColor(image.Black)
	gc.SetFillColor(color.NRGBA{0xAA, 0xAA, 0xAA, 0xFF})
	gc.SetLineWidth(width / 10)
	gc.MoveTo(x0, y0)
	gc.CubicCurveTo(x1, y1, x2, y2, x3, y3)
	gc.Stroke()

	gc.SetStrokeColor(color.NRGBA{0xFF, 0x33, 0x33, 0x88})

	gc.SetLineWidth(width / 20)
	// draw segment of curve
	gc.MoveTo(x0, y0)
	gc.LineTo(x1, y1)
	gc.LineTo(x2, y2)
	gc.LineTo(x3, y3)
	gc.Stroke()
}
func CubicCurve(gc draw2d.GraphicContext, x, y, width, height float64) {
	sx, sy := width/162, height/205
	x0, y0 := x, y+sy*100.0
	x1, y1 := x+sx*75, y+sy*205
	x2, y2 := x+sx*125, y
	x3, y3 := x+sx*205, y+sy*100

	gc.SetStrokeColor(image.Black)
	gc.SetFillColor(color.NRGBA{0xAA, 0xAA, 0xAA, 0xFF})
	gc.SetLineWidth(width / 10)
	gc.MoveTo(x0, y0)
	gc.CubicCurveTo(x1, y1, x2, y2, x3, y3)
	gc.Stroke()

	gc.SetStrokeColor(color.NRGBA{0xFF, 0x33, 0x33, 0x88})

	gc.SetLineWidth(width / 20)
	
	gc.MoveTo(x0, y0)
	gc.LineTo(x1, y1)
	gc.LineTo(x2, y2)
	gc.LineTo(x3, y3)
	gc.Stroke()
}
func CubicCurve ( gc draw2d . GraphicContext , x , y , width , height float64 ) { sx , sy := width / 162 , height / 205 x0 , y0 := x , y + sy * 100.0 x1 , y1 := x + sx * 75 , y + sy * 205 x2 , y2 := x + sx * 125 , y x3 , y3 := x + sx * 205 , y + sy * 100 gc . SetStrokeColor ( image . Black ) gc . SetFillColor ( color . NRGBA { 0xAA , 0xAA , 0xAA , 0xFF } ) gc . SetLineWidth ( width / 10 ) gc . MoveTo ( x0 , y0 ) gc . CubicCurveTo ( x1 , y1 , x2 , y2 , x3 , y3 ) gc . Stroke ( ) gc . SetStrokeColor ( color . NRGBA { 0xFF , 0x33 , 0x33 , 0x88 } ) gc . SetLineWidth ( width / 20 ) // draw segment of curve gc . MoveTo ( x0 , y0 ) gc . LineTo ( x1 , y1 ) gc . LineTo ( x2 , y2 ) gc . LineTo ( x3 , y3 ) gc . Stroke ( ) }
// CubicCurve draws a cubic curve with its control points.
CubicCurve draws a cubic curve with its control points .