Help Center

CGpGraphicsPathIterator.DrawPiemethod

Draws a pie.

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 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

NameDescription
pPenPointer to a pen that is used to draw the pie.
xThe x-coordinate of the upper-left corner of the rectangle that bounds the ellipse in which to draw the pie.
yThe y-coordinate of the upper-left corner of the rectangle that bounds the ellipse in which to draw the pie.
nWidthThe width of the rectangle that bounds the ellipse in which to draw the pie.
nHeightThe height of the rectangle that bounds the ellipse in which to draw the pie.
startAngleThe angle, in degrees, between the x-axis and the starting point of the arc that defines the pie. A positive value specifies clockwise rotation.
sweepAngleThe 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