draw_rectangle_color(x1,y1,x2,y2,col1,col2,col3,col4,outline)
Jump to navigation
Jump to search
Description
Draws a gradient rectangle from point x1,y1 to point x2,y2, like draw rectangle. The col# arguments indicate the 4 corner colors, clockwise from top-left.
Parameters
Parameter | Data Type | Description |
---|---|---|
x1 | float | x coordinate of the top left corner of the rectangle |
y1 | float | y coordinate |
x2 | float | x coordinate of the bottom right corner of the rectangle |
y2 | float | y coordinate |
col1 | integer | top left corner color value or constant |
col2 | integer | top right corner color value or constant |
col3 | integer | bottom right corner color value or constant |
col4 | integer | bottom left corner color value or constant |
Return Values
void: This function does not return anything.
Example Call
//draws a nice rectangle, with sea-ish colors along the x axis, which fade to black as you go down the y axis.
draw_rectangle_color(0, 0, 100, 100, make_color_rgb(0, 200, 100), make_color_rgb(0, 100, 200), c_black, c_black, false)