background_create_from_surface - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Copies part of a surface and then makes it into a new background and returns the index.
- id: index of the surface to copy
- x: (x,y) coordinate representing the top left origin of the copy area
- y
- w: width of the area to copy
- h: height of the area to copy
- removeback: whether or not to remove the background color, determined by the lower left pixel
- smooth: whether to sort of interpolate the background
int: Returns the index of the new background created with part of the surface.
// example of copying a surface into a new background
var surfbg;
surfbg = background_create_from_surface(0, 0, surface_get_width(surfid), surface_get_height(surfid));
NOTOC