BOOL PolyBezier(hdc, lpPoints, nCount) | |||||
HDC hdc; | /* handle of device context | */ | |||
LPPOINT lpPoints; | /* address of endpoints and control points | */ | |||
DWORD nCount; | /* count of endpoints and control points | */ |
The PolyBezier function draws one or more Bezier curves.
hdc
Identifies a device context.
lpPoints
Points to an array of POINT structures which contain the endpoints and the control points. The POINT structure has the following form:
typedef struct tagPOINT { /* pt */
LONG x;
LONG y;
} POINT;
nCount
Specifies the number of points in the lpPoints array. This value must be one more than three times the number of curves to be drawn, since each Bezier curve requires two control points and an end point, and the initial curve requires an additional start point.
The return value is TRUE if the curves were drawn. Otherwise, it is FALSE.
This function draws cubic Bezier splines using the endpoints and the control points specified by the lpPoints parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the end point of the previous curve is used as the start point, the next two points in the sequence are control points, and the third is the end point.
The current position is neither used nor updated by the PolyBezier function. The figure is not filled.
This function draws lines with the current pen.
MoveToEx, PolyBezierTo