GraphicsPath::Reverse 方法 (gdipluspath.h)

GraphicsPath::Reverse 方法反转定义此路径的线条和曲线的点的顺序。

语法

Status Reverse();

返回值

类型: 状态

如果该方法成功,则返回 Ok,这是 Status 枚举的元素。

如果方法失败,它将返回 Status 枚举的其他元素之一。

注解

GraphicsPath 对象具有点数组和类型数组。 类型数组中的每个元素都是一个字节,用于指定点类型和点数组中相应元素的一组标志。 PathPointType 枚举中列出了可能的点类型和标志。

此方法反转点数组和类型数组中元素的顺序。

示例

以下示例创建 一个 GraphicsPath 对象 路径,向 path 添加两行,调用 Reverse 方法,然后绘制 路径


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);
}
 

要求

要求
最低受支持的客户端 Windows XP、Windows 2000 Professional [仅限桌面应用]
最低受支持的服务器 Windows 2000 Server [仅限桌面应用]
目标平台 Windows
标头 gdipluspath.h (包括 Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

另请参阅

AddLines 方法

使用区域进行剪裁

构造并绘制轨迹

创建路径渐变

GetPathPoints 方法

GraphicsPath

GraphicsPath::GetPathData

GraphicsPath::GetPathTypes

路径

Point