Help Center

CGpGraphicsPath.Reversemethod

Reverses the order of the points that define this path's lines and curves.

GraphicsmethodCGpPath.incdocumented

Syntax

FUNCTION Reverse () AS GpStatus

Return value

If the function succeeds, it returns StatusOk, which is an element of the GpStatus enumeration.

If the function fails, it returns one of the other elements of the GpStatus enumeration.

Description

Reverses the order of the points that define this path's lines and curves.

Example

' ======================================================================================== ' The following example creates a GraphicsPath object path, adds two lines to path, calls ' the Reverse method, and then draws path. ' ======================================================================================== SUB Example_Reverse (BYVAL hdc AS HDC)

' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi

DIM points(0 TO 3) AS GpPoint = {(20, 20), (160, 100), (140, 60), (60, 100)}

' // Set up and call Reverse DIM path AS CGpGraphicsPath DIM pts(0 TO 2) AS GpPoint = {(10, 60), (50, 110), (90, 60)} path.AddLines(@pts(0), 3) path.Reverse

' // Draw the path. graphics.DrawPath(@CGpPen(GDIP_ARGB(128, 255, 0, 0), 2), @path)

END SUB ' ========================================================================================

Reference

  • Include file CGpPath.inc
  • Defined in AfxNova/CGpPath.inc:146
  • Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
  • Topic: CGpGraphics Class