Image.blit

From Spheriki

Jump to: navigation, search

Image.blit draws an image to the screen at the specified coordinates.

Contents

Usage

Image.blit(x, y);
  • x The position on the x-axis to draw the image, in pixels.
  • y The position on the y-axis to draw the image, in pixels.

Examples

var image = LoadImage("image.png");
image.blit(0, 0);
FlipScreen();

Draws "image.png" onto the screen at the top left corner, and then displays it.

Notes

You should only ever have to load an image once, so always assign the image to a variable and use that variable to draw the image.

See also

Personal tools