Help Center

CGpGraphicsPathIterator.DrawPathmethod

Draws a sequence of lines and curves defined by a **GraphicsPath** object.

GraphicsmethodCGpGraphics.incdoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION DrawPath (BYVAL pPen AS CGpPen PTR, BYVAL pPath AS CGpGraphicsPath PTR) AS GpStatus

Parameters

NameDescription
pPenPointer to a pen that is used to draw the path.
pPathPointer to a GraphicsPath object that specifies the sequence of lines and curves that make up the path.

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

Draws a sequence of lines and curves defined by a GraphicsPath object.

Example

' ======================================================================================== ' The following example draws a GraphicsPath object. ' ======================================================================================== SUB Example_DrawPath (BYVAL hdc AS HDC)

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

' // Create a GraphicsPath, and add an ellipse DIM ellipsePath AS CGpGraphicsPath ellipsePath.AddEllipse(100, 70, 200, 100)

' // Create a Pen object DIM blackPen AS CGpPen = CGpPen(ARGB_BLACK, 3)

' // Draw ellipsePath. graphics.DrawPath(@blackPen, @ellipsePath)

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

Reference

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