CGpGraphicsPath.AddArcmethod
Adds an elliptical arc to the current figure of this path.
Syntax
FUNCTION AddArc (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 AddArc (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 AddArc (BYVAL rc AS GpRectF, BYVAL startAngle AS SINGLE, BYVAL sweepAngle AS SINGLE) AS GpStatus
FUNCTION AddArc (BYVAL rc AS GpRect, BYVAL startAngle AS SINGLE, BYVAL sweepAngle AS SINGLE) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
x | The x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc. | |
y | The y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc. | |
nWidth | The width of the bounding rectangle for the ellipse that contains the arc. | |
nHeight | The height of the bounding rectangle for the ellipse that contains the arc. | |
startAngle | The clockwise angle, in degrees, between the horizontal axis of the ellipse and the starting point of the arc. | |
sweepAngle | The clockwise angle, in degrees, between the starting point (startAngle) and the ending point of the 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
Adds an elliptical arc to the current figure of this path.
Example
' ======================================================================================== ' The following example creates a GraphicsPath object path, adds an arc to path, closes ' the arc, and then draws path. ' ======================================================================================== SUB Example_AddArc (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
DIM rc AS GpRect = (20, 20, 50, 100)
DIM path AS CGpGraphicsPath path.AddArc(@rc, 0.0, 180.0) path.CloseFigure
' // Draw the path. DIM pen AS CGpPen = ARGB_RED graphics.DrawPath(@pen, @path)
END SUB ' ========================================================================================
Reference
- Include file
CGpPath.inc - Defined in AfxNova/CGpPath.inc:209
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class