draw_background_part

Draws part of a background at a given position.

Syntax:

GML Code Example

draw_background_part(back, left, top, width, height, x, y);


Argument Description
back The index of the background to draw.
left The x position on the background of the top left corner of the area to draw.
top The y position on the background of the top left corner of the area to draw.
width The width of the area to draw.
height The height of the area to draw.
x The x coordinate of where to draw the background.
y The y coordinate of where to draw the background.


Returns: N/A


Description

With this function you can draw part of any background at a given position within the room. As with draw_background you can specify a background, but you then need to specify the relative coordinates within the background of an area to select for drawing. This means that a left position of 0 and a top position of 0 would be the top left corner of the background and all further coordinates should be taken from that position.


Example:

GML Code Example

draw_background_part(bck_Sky, 8, 8, 32, 32, x, y);

This will draw a 32x32 area 8px by 8px in from the top left of the background indexed in "bck_Sky", at the instances (x,y) position.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here