Surface.blit

From Spheriki

Jump to: navigation, search

Draw the surface onto the screen.


Contents

Usage

surface.blit(x, y);
  • surface Sphere Surface object. The surface to draw to the screen.
  • x number. X coordinate to draw the surface on the screen, in pixels.
  • y number. Y coordinate to draw the surface on the screen, in pixels.


Examples

Surface.blit() can be used exactly like Image.blit():

var s = LoadSurface("my_file.png");
// Do stuff to s
s.blit(10, 40);


Notes

  • Although surfaces can be drawn just like images, it is faster to convert a surface into an image if you intend to blit it multiple times.


See also

Personal tools