GraphicsPath::GetPathTypes method (gdipluspath.h)

The GraphicsPath::GetPathTypes method gets this path's array of point types.

Syntax

Status GetPathTypes(
  [out] BYTE *types,
  [in]  INT  count
);

Parameters

[out] types

Type: BYTE*

Pointer to an array that receives the point types. You must allocate memory for this array. You can call the GraphicsPath::GetPointCount method to determine the required size of the array.

[in] count

Type: INT

Integer that specifies the number of elements in the types array. Set this parameter equal to the return value of the GraphicsPath::GetPointCount method.

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

A GraphicsPath object has an array of points and an array of types. Each element in the array of types is a byte that specifies the point type and a set of flags for the corresponding element in the array of points. Possible point types and flags are listed in the PathPointType enumeration.

Examples

The following example creates a path and adds a sequence of three connected lines to the path. The code calls the GraphicsPath::GetPointCount method to determine the number of bytes in the path's array of point types and then allocates a buffer large enough to hold that array. Then the code calls the GraphicsPath::GetPathTypes method to fill the buffer with the array of point types.

GraphicsPath path;
Point pts[] = {Point(0, 0), Point(2, 2), Point(3, 3), Point(0, 5)};
path.AddLines(pts, 4);
INT num = path.GetPointCount();
BYTE* pTypes = new BYTE[num];
path.GetPathTypes(pTypes, num);

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdipluspath.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Clipping with a Region

Constructing and Drawing Paths

Creating a Path Gradient

GetPathPoints Methods

GraphicsPath

GraphicsPath::GetPathData

GraphicsPath::GetPointCount

PathData

PathPointType

Paths

PointF