draw_surface_part(id,left,top,w,h,x,y)
From YoYoGames Wiki
Description
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.
Arguments
- id (real): name of the variable which holds the ID of the surface (see surface_create).
- left (real): 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 (real): 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 (real): Width of surface to be drawn.
- h (real): Height of surface to be drawn.
- x (real): Left position of surface to be drawn.
- y (real): Top position of surface to be drawn.
Remarks
The function must be called in the draw event.
See Also
- Surfaces - a complete Game Maker tutorial in surfaces.
Content from GMKB, was used to expand this article. The content was contributed by Eyas Sharaiha.



