CGpGraphicsPath.CloseFiguremethod
Clears the current figure of this path.
Syntax
FUNCTION CloseFigure () 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
Clears the current figure of this path.
Example
' ======================================================================================== ' The following example creates a GraphicsPath object path and adds two figures to path. ' The code closes the first figure, but leaves the second figure open. ' ======================================================================================== SUB Example_CloseFigure (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 rect1 AS GpRect = (20, 20, 50, 100) DIM rect2 AS GpRect = (40, 40, 50, 100)
DIM path AS CGpGraphicsPath path.AddArc(@rect1, 0, 180) ' // first figure path.CloseFigure ' // first figure closed path.AddArc(@rect2, 0, 180) ' // second figure
' // Draw the path DIM pen AS CGpPen = ARGB_RED graphics.DrawPath(@pen, @path)
END SUB ' ========================================================================================
Reference
- Include file
CGpPath.inc - Defined in AfxNova/CGpPath.inc:114
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class