UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | req.product | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:gdipluspath.GraphicsPath.Outline |
GraphicsPath::Outline (gdipluspath.h) |
The GraphicsPath::Outline method transforms and flattens this path, and then converts this path's data points so that they represent only the outline of the path. |
|
gdiplus\_gdiplus_CLASS_GraphicsPath_Outline_matrix_flatness_.htm |
gdiplus |
VS|gdicpp|~\gdiplus\gdiplusreference\classes\graphicspathclass\graphicspathmethods\outline.htm |
12/05/2018 |
GraphicsPath class [GDI+],Outline method, GraphicsPath.Outline, GraphicsPath::Outline, Outline, Outline method [GDI+], Outline method [GDI+],GraphicsPath class, _gdiplus_CLASS_GraphicsPath_Outline_matrix_flatness_, gdiplus._gdiplus_CLASS_GraphicsPath_Outline_matrix_flatness_ |
gdipluspath.h |
Gdiplus.h |
Windows |
Windows XP, Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Gdiplus.lib |
Gdiplus.dll |
Windows |
GDI+ 1.0 |
19H1 |
|
|
|
|
|
|
The GraphicsPath::Outline method transforms and flattens this path, and then converts this path's data points so that they represent only the outline of the path.
Type: const Matrix*
Optional. Pointer to a Matrix object that specifies the transformation. If this parameter is NULL, no transformation is applied. The default value is NULL.
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.
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.
A GraphicsPath object stores a collection of data points that represent lines and curves. The GraphicsPath::Outline method changes those data points, and the original data points are lost.
The following example creates a GraphicsPath object and calls the GraphicsPath::AddClosedCurve method to add a closed cardinal spline to the path. The code calls the GraphicsPath::Widen method to widen the path and then draws the path. Next, the code calls the path's Outline method. The code calls the TranslateTransform method of a Graphics object so that the outlined path drawn by the subsequent call to DrawPath sits to the right of the first path.
VOID OutlineExample(HDC hdc)
{
Graphics graphics(hdc);
Pen bluePen(Color(255, 0, 0, 255));
Pen greenPen(Color(255, 0, 255, 0), 10);
PointF points[] = {
PointF(20.0f, 20.0f),
PointF(160.0f, 100.0f),
PointF(140.0f, 60.0f),
PointF(60.0f, 100.0f)};
GraphicsPath path;
path.AddClosedCurve(points, 4);
path.Widen(&greenPen);
graphics.DrawPath(&bluePen, &path);
path.Outline();
graphics.TranslateTransform(180.0f, 0.0f);
graphics.DrawPath(&bluePen, &path);
}