GM: draw rectangle color

From GMpedia.org Wiki

Jump to: navigation, search
The correct title of this article is draw_rectangle(x1,y1,x2,y2,outline). It appears incorrectly here because of technical restrictions.
The correct title of this article is draw_rectangle(). It appears incorrectly here because of technical restrictions.


Arguments

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]

Limitations

must be in Draw Event or used with Surfaces.

Note: Please remove limitations and port them in the "Remarks" section at the end of the article.

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 colors at each corner.

[edit] See Also

This article was originally found at the Game Maker Knowledge Base, contributed by Yibbon(.com.au).
See the talk page for details
Personal tools