GM: draw surface part

From GMpedia.org Wiki

Jump to: navigation, search
The correct title of this article is draw_surface_part(id,left,top,w,h,x,y). It appears incorrectly here because of technical restrictions.
The correct title of this article is draw_surface_part(). It appears incorrectly here because of technical restrictions.


Arguments

id = name of the variable which holds the ID of the surface (see surface_create).

left = This is the position on the x axis that the surface will start to be drawn in. So everything that is located before left (has an x value less than left) will not be drawn.

top = this is the position on the y axis that the surface will stat to be drawn in. So everything tat is located before top (has a y value less tan top) will not be drawn.

w = Width of surface to be drawn.

h = Height of surface to be drawn.

x = Left position of surface to be drawn.

y = Top position of surface to be drawn.

Limitations

must be in Draw Event.

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

This function draws part of a surface with the given ID on the screen in the position x,y, it starts drawing from the surface from the point left,top with the width of w and height of h.

Image:Surface drawn room.pngImage:Surface drawn surface.png

[edit] See Also

This article was originally found at the Game Maker Knowledge Base, contributed by Eyas Sharaiha.
See the talk page for details
Personal tools