GraphicsPath::Flatten method (gdipluspath.h)

The GraphicsPath::Flatten method applies a transformation to this path and converts each curve in the path to a sequence of connected lines.

Syntax

Status Flatten(
  [in] const Matrix *matrix,
  [in] REAL         flatness
);

Parameters

[in] matrix

Type: const Matrix*

Optional. Pointer to a Matrix object that specifies the transformation to be applied to the path's data points. The default value is NULL, which specifies that no transformation is to be applied.

[in] flatness

Type: REAL

Optional. Real number that specifies the maximum error between the path and its flattened approximation. Reducing the flatness increases the number of line segments in the approximation. The default value is FlatnessDefault, which is a constant defined in Gdiplusenums.h.

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.

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

Flattening Paths

GraphicsPath

Matrix

Paths