VgaGames4 - image man-pages

[.. upper level ..]

vg4->image->copy()

Copy image onto another image.

SYNTAX
void vg4->image->copy(struct VG_Image *imgdst, const struct VG_Image *imgsrc, const struct VG_Position *posdst, const struct VG_ImagecopyAttr *iattr)

FUNCTION PARAMETERS
imgdst Destination image
imgsrc Source image
posdst Destination position, or NULL = copy centered
iattr Image-copy attributes for source image, or NULL

DESCRIPTION
Copy image onto another image. Opaqueness will be respected.

EXAMPLE
/* copy imgp2 onto left upper corner of imgp1 */

struct VG_Image *imgp1, *imgp2;
struct VG_Position posdst;

/* load images, assuming no error */
imgp1 = vg4->image->load("myimg1.bmp");
imgp2 = vg4->image->load("myimg2.bmp");

/* set position */
posdst.pos = VG_POS_UPPER_LEFT;
posdst.x = posdst.y = 0;

/* copy imgp2 onto imgp1 */
vg4->image->copy(imgp1, imgp2, &posdst, NULL);