draw_rectangle_color(x1,y1,x2,y2,c1,c2,c3,c4,outline)

Note: This function must be placed in the Draw Event for it to work correctly.

 

x1, y1 = Horizontal / vertical start of the line.

x2, y2 = Horizontal / vertical end of the line.

c1 = Top-left colour.

c2 = Top-right colour.

c3 = Bottom-right colour.

c4 = Bottom-left colour.

outline = true / false. Whether the triangle is drawn as a thin line or filled in the current colour. [true=no fill / false = fill in current colour]

 

Example:

//Draw a left to right gradient of blue and yellow across room.

g1=c_blue

g2=c_yellow

g3=c_yellow

g4=c_blue

draw_rectangle_color(0,0,room_width,room_width,g1,g2,g3,g4,0)

 

Just like drawing a normal rectangle-we plot the two coordinates and choose if we want an outline. But this function also gives us the option to have colours at each corner.

 

Yibbon(.com.au) - Revision #1