CDC::GetPath

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:

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 OverviewClass MembersHierarchy Chart

See Also   CDC::FlattenPath, CDC::PolyDraw, CDC::WidenPath