CGpGraphicsPath.AddBeziersmethod
Adds a sequence of connected Bézier splines to the current figure of this path.
Syntax
FUNCTION AddBeziers (BYVAL pts AS GpPointF PTR, BYVAL count AS INT_) AS GpStatus
FUNCTION AddBeziers (BYVAL pts AS GpPoint PTR, BYVAL count AS INT_) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pts | Pointer to an array of starting points, ending points, and control points for the connected splines. The first spline is constructed from the first point through the fourth point in the array and uses the second and third points as control points. Each subsequent spline in the sequence needs exactly three more points: the ending point of the previous spline is used as the starting point, the next two points in the sequence are control points, and the third point is the ending point. | |
count | Integer that specifies the number of elements in the pts array. |
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 a sequence of connected Bézier splines to the current figure of this path.
Example
' ======================================================================================== ' The following example creates a GraphicsPath object path, adds a sequence of two connected ' Bézier splines to path, closes the current figure (the only figure in this case), and ' then draws path. ' ======================================================================================== SUB Example_AddBeziers (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 pts(0 TO 6) AS GpPoint = {(50, 50), (60, 20), (70, 100), (80, 50), (120, 40), (150, 80), (170, 30)} DIM path AS CGpGraphicsPath path.AddBeziers(@pts(0), 7) 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:261
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class