Reverse

GraphicsPath.Reverse method

Applies to: desktop apps only

The GraphicsPath::Reverse method reverses the order of the points that define this path's lines and curves.

Syntax

Status Reverse();

Parameters

This method has no parameters.

Return value

Type:

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.

This method reverses the order of the elements in the array of points and in the array of types.

Examples

The following example creates a GraphicsPath object path, adds two lines to path, calls the Reverse method, and then draws path.



VOID ReverseExample(HDC hdc)
{
   Graphics graphics(hdc);
   GraphicsPath path;

   // Set up and call Reverse.
   Point pts[] = {Point(10, 60),
                  Point(50, 110),
                  Point(90, 60)};
   path.AddLines(pts, 3);
   path.Reverse();

   // Draw the path.
   graphics.DrawPath(&Pen(Color(128, 255, 0, 0), 2), &path);
}
 

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdipluspath.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

GraphicsPath
AddLines Methods
GraphicsPath::GetPathData
GetPathPoints Methods
GraphicsPath::GetPathTypes
Point
Clipping with a Region
Constructing and Drawing Paths
Creating a Path Gradient
Paths

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2016 Microsoft