[]
Gradient fills the rectangle with colors.
public void FillRectangle(Color startColor, Color endColor, Rectangle rectangle, bool verticalDirection)
| Type | Name | Description |
|---|---|---|
| Color | startColor | Color structure that represents the start color of gradient. |
| Color | endColor | Color structure that represents the end color of gradient. |
| Rectangle | rectangle | Rectangle structure that represents the rectangle to fill. |
| bool | verticalDirection | A bool indicates the fill direction. false is horizontal direction. true is vertical direction. |
Fills the specified rectangle by using the specified brush.
public virtual void FillRectangle(IntPtr brushHandle, Rectangle rectangle)
| Type | Name | Description |
|---|---|---|
| IntPtr | brushHandle | A IntPtr indicates the handle of the brush. |
| Rectangle | rectangle | A Rectangle indicate the rectangle to fill. |
When filling the specified rectangle, it does not include the rectangle's right and bottom sides. GDI fills a rectangle up to, but not including, the right column and bottom row, regardless of the current mapping mode.
| Type | Condition |
|---|---|
| SystemErrorException |
Fills the specified rectangle by using the current brush of device context.
public virtual void FillRectangle(Rectangle rectangle, RasterOperationCode rasterOperationCode)
| Type | Name | Description |
|---|---|---|
| Rectangle | rectangle | A Rectangle indicates the rectangle to fill. |
| RasterOperationCode | rasterOperationCode | A RasterOperationCode indicates the rester operation code. |
Not all devices support the this function. For more information, see the description of the RC_BITBLT capability in the GetDeviceCaps function.
| Type | Condition |
|---|---|
| SystemErrorException |