CGpGraphicsPath.AddEllipsemethod
Adds an ellipse to this path.
Syntax
FUNCTION AddEllipse (BYVAL x AS SINGLE, BYVAL y AS SINGLE, BYVAL nWidth AS SINGLE, BYVAL nHeight AS SINGLE) AS GpStatus
FUNCTION AddEllipse (BYVAL x AS INT_, BYVAL y AS INT_, BYVAL nWidth AS INT_, BYVAL nHeight AS INT_) AS GpStatus
FUNCTION AddEllipse (BYVAL rc AS GpRectF PTR) AS GpStatus
FUNCTION AddEllipse (BYVAL rc AS GpRect PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
x | The x-coordinate of the upper-left corner of the bounding rectangle for the ellipse. | |
y | The y-coordinate of the upper-left corner of the bounding rectangle for the ellipse. | |
nWidth | The width of the bounding rectangle for the ellipse. | |
nHeight | The height of the bounding rectangle for the ellipse. | |
rc | Pointer to a GpRectF or GpRect structure specifying the dimensions of the rectagle. |
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 ellipse to this path.
Example
' ======================================================================================== ' The following example creates a GraphicsPath object path, adds an ellipse to path, and ' then draws path. ' ======================================================================================== SUB Example_AddEllipse (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 path AS CGpGraphicsPath path.AddEllipse(20, 20, 200, 100)
' // 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:380
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class