Background_create_from_screen - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Notation

Description

Copies part of whats currently on the screen, not the entire display, just the game window, and then makes it into a new background and returns the id.

Parameters

  • 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 screen.

Example Call

// example of copying the entire game window into a new background
var screenbg;
screenbg = background_create_from_screen(0, 0, window_get_width(), window_get_height());

NOTOC