Phantom Documentation

[Help Home] [Phantom Home]
blit

void bitmap.blit(int,int,bitmap)

Return Type: void
Parameters:
int X - The x location to place the bitmap
int Y -The y location to place the bitmap
bitmap B - The bitmap to insert

void bitmap.blit(int,int,bitmap,bitmap)

Return Type: void
Parameters:
int X - The x location to place the bitmap
int Y -The y location to place the bitmap
bitmap Source - The bitmap to insert
bitmap Mask - A mask bitmap



Description:

This function copies the bitmap 'Source' to the location indicated by X, Y. X and Y are zero based pixel locations, with 0,0 representing the lower left corner of the bitmap. The rest of the bitmap data contained by this variable will not be modified.

Note that the copied bitmap (Source) must fit within the bounds of the bitmap contained in this variable.

If the Mask bitmap parameter is used, only those pixels in Source that are not masked are copied. The Mask is a bitmap the same size (width and height). The R,G,B of each Source pixel is compared against the corresponding R,G,B of the Mask pixel. If the (R or G or B) value of the Mask pixel is 0, then the (R or G or B) value of the Source pixel is not copied. If the (R or G or B) value of the Mask pixel is not zero, then the (R or G or B) bits are binary ANDed with the (R or G or B) bits of the Source pixel, with the result copied.

To copy the entire Source R,G,B value, set the corresponding Mask pixel to (R=255,G=255,B=255). To copy none of the Source R,G,B value, set the corresponding MaskPixel to (R=0, G=0, B=0).

For an example, see the bitmap variable page.




Copyright 2000-2011 Phantom Automated Solutions