CGpGraphicsPathIterator.DrawPiemethod
Draws a pie.
Syntax
FUNCTION DrawPie (BYVAL pPen AS CGpPen 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 DrawPie (BYVAL pPen AS CGpPen PTR, BYVAL x AS INT_, BYVAL y AS INT_, BYVAL nWidth AS INT_, BYVAL nHeight AS INT_, BYVAL startAngle AS INT_, BYVAL sweepAngle AS INT_) AS GpStatus
FUNCTION DrawPie (BYVAL pPen AS CGpPen PTR, BYVAL rc AS GpRectF, BYVAL startAngle AS SINGLE, BYVAL sweepAngle AS SINGLE) AS GpStatus
FUNCTION DrawPie (BYVAL pPen AS CGpPen PTR, BYVAL rc AS GpRect, BYVAL startAngle AS INT_, BYVAL sweepAngle AS INT_) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pPen | Pointer to a pen that is used to draw the pie. | |
x | The x-coordinate of the upper-left corner of the rectangle that bounds the ellipse in which to draw the pie. | |
y | The y-coordinate of the upper-left corner of the rectangle that bounds the ellipse in which to draw the pie. | |
nWidth | The width of the rectangle that bounds the ellipse in which to draw the pie. | |
nHeight | The height of the rectangle that bounds the ellipse in which to draw the pie. | |
startAngle | The angle, in degrees, between the x-axis and the starting point of the arc that defines the pie. A positive value specifies clockwise rotation. | |
sweepAngle | The angle, in degrees, between the starting and ending points of the arc that defines the pie. A positive value specifies clockwise rotation. |
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 pie.
Example
' ======================================================================================== ' The following example draws a pie. ' ======================================================================================== SUB Example_DrawPie (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // Draw the pie DIM blackPen AS CGpPen = CGpPen(ARGB_BLACK, 3) graphics.DrawPie(@blackPen, 0.0, 0.0, 200.0, 100.0, 0.0, 45.0)
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class