GraphicsPath::Reverse 方法 (gdipluspath.h)

GraphicsPath::Reverse 方法會反轉定義此路徑線條和曲線的點順序。

Syntax

Status Reverse();

傳回值

類型: 狀態

如果方法成功,它會傳回Ok,這是 Status 列舉的元素。

如果方法失敗,它會傳回 Status 列舉的其中一個其他元素。

備註

GraphicsPath 物件具有點數位和類型的數位。 型別數位中的每個元素都是位元組,指定點類型,以及點陣列中對應元素的一組旗標。 PathPointType 列舉中會列出可能的點類型和旗標。

這個方法會反轉點陣列和型別數位中元素的順序。

範例

下列範例會建立 GraphicsPath 物件 路徑、將兩行新增至 路徑、呼叫 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)
程式庫 Gdiplus.lib
Dll Gdiplus.dll

另請參閱

AddLines 方法

使用區域裁剪

建構和繪製路徑

建立路徑漸層

GetPathPoints 方法

GraphicsPath

GraphicsPath::GetPathData

GraphicsPath::GetPathTypes

路徑