CGpGraphics.FillRectanglesmethod
Uses a brush to fill the interior of a sequence of rectangles.
Syntax
FUNCTION FillRectangles (BYVAL pBrush AS CGpBrush PTR, BYVAL rects AS GpRectF PTR, BYVAL count AS INT_) AS GpStatus
FUNCTION FillRectangles (BYVAL pBrush AS CGpBrush PTR, BYVAL rects AS GpRect PTR, BYVAL count AS INT_) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pBrush | Pointer to a brush that is used to paint the interior of each rectangle. | |
rects | Pointer to an array of rectangles to be filled. | |
count | Integer that specifies the number of rectangles 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
Uses a brush to fill the interior of a sequence of rectangles.
Example
' ======================================================================================== ' The following example fills a sequence of rectangles. ' ======================================================================================== SUB Example_FillRectangles (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // Create a pen object DIM blackBrush AS CGpSolidBrush = CGpSolidBrush(ARGB_BLACK)
' // Create an array of RectF objects. DIM rects(0 TO 2) AS GpRectF = {(0, 0, 100, 200), (100.5, 200.5, 200.5, 50.5), (300.8, 0.8, 50.8, 150.8)}
' // Draw the rectangles graphics.FillRectangles(@blackBrush, @rects(0), 3)
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:725
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class