DarkBASIC Professional Help File

DX11 DRAW RECT

Draws a rectangle of the given dimensions with the provided top-left coordinate.
The colour of the rectangle can optionally be bilinearly interpolated with one colour per corner.

Syntax

    DX11 DRAW RECT x, y, width, height, colour, [colour2], [colour3], [colour4]

Parameters

    x

> Integer
> The X coordinate of the top-left corner of the rectangle.

    y

> Integer
> The Y coordinate of the top-left corner of the rectangle.

    width

> Dword
> The width of the rectangle (in pixels).

    height

> Dword
> The height of the rectangle (in pixels).

    colour

> Dword
> The colour of the rectangle, or the top-left colour if also providing subsequent corner colours.

    [Optional] colour2

> Dword
> The colour of the top-right corner of the rectangle.

    [Optional] colour3

> Dword
> The colour of the bottom-left corner of the rectangle.

    [Optional] colour4

> Dword
> The colour of the bottom-right corner of the rectangle.

Returns

This function does not return a value.

See also

DIRECTDRAWING Functions Menu
DX11 Function Categories