Home  Contents

gcx:blit

Graphics Core4 Lua Commands

SYNOPSIS

  1. gcx:blit(dst)
  2. gcx:blit(dst, dx, dy)
  3. gcx:blit(dst, dx, dy, w, h)
  4. gcx:blit(sx, sy, dst, dx, dy, w, h)
  5. gcx:blit()
  6. gcx:blit(dx, dy)
  7. gcx:blit(dx, dy, w, h)
  8. gcx:blit(sx, sy, dx, dy, w, h)
  9. gcx:blitframe(frm, ...)

DESCRIPTION

Copies the contents of gcx to a destination context.

Param Description Default value
dx, dy Coordinates in destination bitmap 0, 0
w, h Size of rectangle Size of gcx
sx, sy Coordinates in source bitmap 0, 0
dst Destination bitmap Parent of gcx

The parent of gcx is the context that was called in order to create gcx. If gcx stores an animation, the first frame is copied.

gcx:blitframe does the same as gcx:blit(), but if gcx is an animation, this function allows selecting a specific frame number (1..N).

ERRORS

Raises an error if gcx or dst is not a graphics context. If any of the coordinates are out of range, nothing happens.

EXAMPLE

>  >  > 
fb = gfx.open() img = fb:load("/media/mmc0a/320x240/bird.png") img:blit(0,0)

SEE ALSO