[]
        
(Showing Draft Content)

C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.FillRectangle

FillRectangle Method

FillRectangle(Color, Color, Rectangle, bool)

Gradient fills the rectangle with colors.

Declaration
public void FillRectangle(Color startColor, Color endColor, Rectangle rectangle, bool verticalDirection)
Parameters
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.

FillRectangle(nint, Rectangle)

Fills the specified rectangle by using the specified brush.

Declaration
public virtual void FillRectangle(nint brushHandle, Rectangle rectangle)
Parameters
Type Name Description
nint brushHandle

A nint indicates the handle of the brush.

Rectangle rectangle

A Rectangle indicate the rectangle to fill.

Remarks

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.

Exceptions
Type Condition
SystemErrorException

FillRectangle(Rectangle, RasterOperationCode)

Fills the specified rectangle by using the current brush of device context.

Declaration
public virtual void FillRectangle(Rectangle rectangle, RasterOperationCode rasterOperationCode)
Parameters
Type Name Description
Rectangle rectangle

A Rectangle indicates the rectangle to fill.

RasterOperationCode rasterOperationCode

A RasterOperationCode indicates the rester operation code.

Remarks

Not all devices support the this function. For more information, see the description of the RC_BITBLT capability in the GetDeviceCaps function.

Exceptions
Type Condition
SystemErrorException