int GetPath( LPPOINT lpPoints, LPBYTE lpTypes, int nCount ) const;
Return Value
If the nCount parameter is nonzero, the number of points enumerated. If nCount is 0, the total number of points in the path (and GetPath writes nothing to the buffers). If nCount is nonzero and is less than the number of points in the path, the return value is -1.
Parameters
lpPoints
Points to an array of POINT data structures or CPoint objects where the line endpoints and curve control points are placed.
lpTypes
Points to an array of bytes where the vertex types are placed. Values are one of the following:
PT_BEZIERTO types always occur in sets of three. The point in the path immediately preceding them defines the starting point for the Bézier curve. The first two PT_BEZIERTO points are the control points, and the third PT_BEZIERTO point is the end point (if hard-coded).
A PT_LINETO or PT_BEZIERTO type may be combined with the following flag (by using the bitwise operator OR) to indicate that the corresponding point is the last point in a figure and that the figure should be closed:
nCount
Specifies the total number of POINT data structures that may be placed in the lpPoints array. This value must be the same as the number of bytes that may be placed in the lpTypes array.
Remarks
Retrieves the coordinates defining the endpoints of lines and the control points of curves found in the path that is selected into the device context. The device context must contain a closed path. The points of the path are returned in logical coordinates. Points are stored in the path in device coordinates, so GetPath changes the points from device coordinates to logical coordinates by using the inverse of the current transformation. The FlattenPath member function may be called before GetPath, to convert all curves in the path into line segments.
CDC Overview | Class Members | Hierarchy Chart
See Also CDC::FlattenPath, CDC::PolyDraw, CDC::WidenPath