CGpGraphics.FillPiemethod
Uses a brush to fill the interior of a pie.
Syntax
FUNCTION FillPie (BYVAL pBrush AS CGpBrush PTR, BYVAL x AS SINGLE, BYVAL y AS SINGLE, BYVAL nWidth AS SINGLE, BYVAL nHeight AS SINGLE, BYVAL startAngle AS SINGLE, BYVAL sweepAngle AS SINGLE) AS GpStatus
FUNCTION FillPie (BYVAL pBrush AS CGpBrush PTR, BYVAL x AS INT_, BYVAL y AS INT_, BYVAL nWidth AS INT_, BYVAL nHeight AS INT_, BYVAL startAngle AS SINGLE, BYVAL sweepAngle AS SINGLE) AS GpStatus
FUNCTION FillPie (BYVAL pBrush AS CGpBrush PTR, BYVAL rc AS GpRectF PTR) AS GpStatus
FUNCTION FillPie (BYVAL pBrush AS CGpBrush PTR, BYVAL rc AS GpRect PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pBrush | Pointer to a brush that is used to paint the interior of the pie. | |
x | The x-coordinate of the upper-left corner of the rectangle that bounds the ellipse. A curved portion of the ellipse is the arc of the pie. | |
y | The y-coordinate of the upper-left corner of the rectangle that bounds the ellipse. | |
nWidth | The width of the rectangle that bounds the ellipse. | |
nHeight | The height of the rectangle that bounds the ellipse. | |
startAngle | The angle, in degrees, between the x-axis and the starting point of the pie's arc. | |
swepAngle | The angle, in degrees, between the starting and ending points of the pie's arc. |
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 pie.
Example
' ======================================================================================== ' The following example defines a pie and then fills it. ' ======================================================================================== SUB Example_FillPie (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
' // Fill the pie. graphics.FillPie(@blackBrush, 0, 0, 200, 100, 0, 45)
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:784
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class