Help Center

CGpGraphicsPath.StartFiguremethod

Starts a new figure without closing the current figure.

GraphicsmethodCGpPath.incdocumented

Syntax

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

Starts a new figure without closing the current figure. Subsequent points added to this path are added to the new figure.

Example

' ======================================================================================== ' The following example creates a path and adds two figures to that path. The first figure ' has three arcs, and the second figure has two arcs. The arcs within a figure are connected ' by straight lines, but there is no connecting line between the last arc in the first ' figure and the first arc in the second figure. ' ======================================================================================== SUB Example_StartFigure (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 pen AS CGpPen = ARGB_BLUE DIM rc AS GpRect = (0, 0, 100, 50) DIM path AS CGpGraphicsPath

path.AddArc(0, 0, 100, 50, 0.0, 180.0) path.AddArc(0, 60, 100, 50, 0.0, 180.0) path.AddArc(0, 120, 100, 50, 0.0, 180.0)

' // Start a new figure (subpath). ' // Do not close the current figure. path.StartFigure path.AddArc(0, 180, 100, 50, 0.0, 180.0) path.AddArc(0, 240, 100, 50, 0.0, 180.0)

graphics.DrawPath(@pen, @path)

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

Reference

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