AGG lesson 17 Bezier curve control points
Extracted from: http://blog.chinaunix.net/uid-20622737-id-3161025.html
/ / Bezier curve, the input parameters are the starting point coordinates, the first control point coordinates, the end point coordinates
/ / curve4 also adds the coordinates of the second control point as a parameter
Agg::curve3 curve (20,20,130,130,600,240)
Agg::conv_stroke stroke2 (curve)
Ras.add_path (stroke2)
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255j0pl 0))
At present, there is no use of any Bezier curve, nor any processing of related information, just a brief introduction to the use of this function. The control points described above do not make any adjustments, so they do not look like any curves and need to be calculated mathematically.
Describe again:
/ / Bezier curve, the input parameters are the starting point coordinates, the first control point coordinates, the end point coordinates
/ / curve4 also adds the coordinates of the second control point as a parameter
The constructor of the curve3 class is as follows:
Curve3 (double x1, double y1)
Double x2, double y2
Double x3, double y3)
The constructor of the curve4 class is as follows:
Curve4 (double x1, double y1)
Double x2, double y2
Double x3, double y3
Double x4, double y4)