Home  Contents

gcx:image

Graphics Core4 Lua Commands

SYNOPSIS

gcx:image([x, y,] filename)

DESCRIPTION

Loads the image file from filename and paints it to the given coordinate pair. If the coordinate pair is not specified, assumes 0, 0.

ERRORS

Raises an error if gcx is not a graphics context.

EXAMPLE

>  > 
fb = gfx.open() fb:image("/media/mmc0a/320x240/bird.png")

NOTES

This function will load the image from file each time it is called. If you need to paint the same image multiple times, better cache it into a variable using gcx:load and paint it using gcx:blit.

SEE ALSO