Supported Browsers Home   
PutMonoImageMSBLin Previous   
PutPixel Next   
GA_2DRenderFuncs Up   

PutMonoImageMSBSys

Draws a monochrome bitmap stored in system memory

Declaration

void NAPI GA_2DRenderFuncs::PutMonoImageMSBSys(
    N_int32 x,
    N_int32 y,
    N_int32 width,
    N_int32 height,
    N_int32 byteWidth,
    N_uint8 *image,
    N_int32 transparent)

Prototype In

snap/graphics.h

Parameters

x

Destination X coordinate to draw the bitmap at

y

Destination Y coordinate to draw the bitmap at

width

Width of the bitmap in pixels

height

Height of the bitmap in pixels

byteWidth

Width of the bitmap in bytes

image

Pointer to the bitmap image data to draw

transparent

1 for transparent, 0 for opaque

 

Description

This function copies a monochrome bitmap image from a system memory buffer to video memory using the hardware accelerator, which is used for fast bitmap masking and font rendering operations. The bitmap is rendered using the currently active colors and mix.

The x and y parameters define the destination coordinate for the image, and the width and height parameters define the dimensions of the monochrome image to be displayed. The byteWidth parameter defines the width of the bitmap image in bytes, and must be equal to the value of (width + 7) / 8. Hence the width parameter is used to clip off unwanted pixels on the right hand edge of the bitmap, but it cannot clip off more than a single bytes worth of pixels. The image pointer points to the start of the monochrome image in system memory and is byte packed.

If the transparent parameter is set to 1, where a bit is 0 in the bitmap image the destination pixel remains untouched. If the transparent parameter is set to 0, where a bit is 0 in the bitmap image the destination pixel is drawn in the background color. In all cases where a bit in the bitmap image is 1, the pixel is drawn in the foreground color.

Note:    This function processes the bitmap data in MSB fashion, in that the first pixel drawn corrsponds to bit 7 of the first byte. The second pixel is bit 6 of the first byte, ...,the 8th pixel is bit 7 of the second byte etc. Both LSB and MSB versions are provided for performance.

Note:    Both the MSB and LSB versions should only be implemented if the hardware supports both bitmap processing modes. If the hardware only supports one mode, only that mode must be implemented so that the higher level code can use the most optimal method of bit-swizzling the bitmap data before sending it to the driver.

See Also

PutMonoImageMSBLin, PutMonoImageMSBBM, PutMonoImageMSBSys, PutMonoImageLSBLin, PutMonoImageLSBBM, ClipMonoImageLSBSys, ClipMonoImageLSBLin, ClipMonoImageLSBBM, ClipMonoImageMSBSys, ClipMonoImageMSBLin, ClipMonoImageMSBBM

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com