CGpGraphics.FillPathmethod
Uses a brush to fill the interior of a path.
Syntax
FUNCTION FillPath (BYVAL pBrush AS CGpBrush PTR, BYVAL pPath AS CGpGraphicsPath PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pBrush | Pointer to a brush that is used to paint the interior of the path. | |
pPath | Pointer to a GraphicsPath object that specifies 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
Uses a brush to fill the interior of a path. If a figure in the path is not closed, this method treats the nonclosed figure as if it were closed by a straight line that connects the figure's starting and ending points.
Example
' ======================================================================================== ' The following example fills a path. ' ======================================================================================== SUB Example_FillPath (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(0, 0, 200, 100)
' // Create a SolidBrush object DIM blackBrush AS CGpSolidBrush = ARGB_BLACK
' // Draw ellipsePath graphics.FillPath(@blackBrush, @ellipsePath)
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:809
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class