draw_background_part

Draws part of a background at a given position.

Syntax:

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:

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.


Back: Drawing Sprites And Backgrounds
Next: draw_background_part_ext
© Copyright YoYo Games Ltd. 2018 All Rights Reserved