CGpGraphicsPathIterator.DrawPathmethod
Draws a sequence of lines and curves defined by a **GraphicsPath** object.
Syntax
FUNCTION DrawPath (BYVAL pPen AS CGpPen PTR, BYVAL pPath AS CGpGraphicsPath PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pPen | Pointer to a pen that is used to draw the path. | |
pPath | Pointer 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