CGpGraphicsPath.AddRectanglesmethod
Adds a sequence of rectangles to this path.
Syntax
FUNCTION AddRectangles (BYVAL rects AS GpRectF PTR, BYVAL nCount AS INT_) AS GpStatus
FUNCTION AddRectangles (BYVAL rects AS GpRect PTR, BYVAL nCount AS INT_) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
rects | Pointer to an array of rectangles that will be added to the path. | |
nCount | Integer that specifies the number of elements in the rects 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 rectangles to this path.
Example
' ======================================================================================== ' The following example creates a GraphicsPath object path, adds two rectangles to path, and then draws path. ' ======================================================================================== SUB Example_AddRectangles (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 rects(0 TO 1) AS GpRect = {(20, 20, 100, 50), (30, 30, 50, 100)} DIM path AS CGpGraphicsPath path.AddRectangles(@rects(0), 2)
' // 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:367
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class