Help Center

CGpGraphicsPath.CloseAllFiguresmethod

Clears the markers from this path.

GraphicsmethodCGpPath.incdocumented

Syntax

FUNCTION CloseAllFigures () 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

Closes all open figures in this path.

Example

' ======================================================================================== ' The following example creates a GraphicsPath object path, adds two figures to path (arcs), ' closes all figures, and then draws path. ' ======================================================================================== SUB Example_CloseAllFigures (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.StartFigure path.AddArc(@rect2, 0, 180) ' // second figure path.CloseAllFigures

' // 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:122
  • Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
  • Topic: CGpGraphics Class