Background_create_from_surface - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Notation

Description

Copies part of a surface and then makes it into a new background and returns the index.

Parameters

  • 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

Return Values

int: Returns the index of the new background created with part of the surface.

Example Call

// 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