GraphicsPath::AddBezier(constPointF&,constPointF&,constPointF&,constPointF&) method (gdipluspath.h)
The GraphicsPath::AddBezier method adds a Bézier spline to the current figure of this path.
Syntax
Status AddBezier(
const PointF & pt1,
const PointF & pt2,
const PointF & pt3,
const PointF & pt4
);
Parameters
pt1
Reference to a point at which to start the Bézier spline.
pt2
Reference to a point that is the first control point of the Bézier spline.
pt3
Reference to a point that is the second control point of the Bézier spline.
pt4
Reference to a point at which to end the Bézier spline.
Return value
Type: Status
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Remarks
Examples
The following example creates a GraphicsPath object path, adds a Bézier spline to path, closes the current figure (the only figure in this case), and then draws path.
VOID Example_AddBezier(HDC hdc)
{
Graphics graphics(hdc);
GraphicsPath path;
PointF pt1(50.0f, 50.0f);
PointF pt2(60.0f, 20.0f);
PointF pt3(70.0f, 100.0f);
PointF pt4(80.0f, 50.0f);
path.AddBezier(pt1, pt2, pt3, pt4);
path.CloseFigure();
// Draw the path.
Pen pen(Color(255, 255, 0, 0));
graphics.DrawPath(&pen, &path);
}
Requirements
Requirement | Value |
---|---|
Header | gdipluspath.h |