Warning: This site is under construction, most links will be broken.

LightX API -> lxgfx -> drawrect

Last modified on Thu, 29th Mar 2007 at 18:52 UTC by zipplet

lxgfx.drawrect


procedure drawrect(
  dest: tlxhandle;
  src: tlxhandle;
  x, y: tlxposition;
  src_x, src_y, src_w, src_h: tlxposition
);


Draws a portion of the source surface on top of the destination surface.

You can perform this operation by using lxgfx.setwindow on the source surface and then using lxgfx.draw, but this is slower than a method to perform both operations at once. Since this operation will be a very common one in tile based games I decided to implement a method especially for it.

dest: tlxhandle
The surface to draw on.

src: tlxhandle
The surface to draw onto the destination surface.

x, y: tlxposition
The X, Y co-ordinates to start drawing at on the destination surface.

src_x, src_y, src_w, src_h: tlxposition
The portion of the source surface to draw onto the destination surface.

Class: lxgfx