HOOPS/3dGS I.M. Interface

     << Back      Full Index      Forward >>


Draw_DC_Image_Block


Functions

void Draw_DC_Image_Block (HT_Rendition *nr, HT_DC_Point *start, int width, int height, char format, int rowbytes, void **data)
void Draw_DC_Image (HT_Rendition *nr, HT_DC_Point *start, HT_DC_Point *end, int hoffset, char format, int rowbytes, void **rasters, const int pattern, HT_Driver_Color *contr_clr, HT_IMAGE *db_image)

Function Documentation

void Draw_DC_Image_Block HT_Rendition *  nr,
HT_DC_Point *  start,
int  width,
int  height,
char  format,
int  rowbytes,
void **  data
 

Draws a generalized image.

Parameters:
nr - Rendition. Passed by reference
start - Upper-left corner of image on display. Passed by reference
width - Horizontal size of image, in pixels.
height - Vertical size of image, in pixels.
format - Image format symbolic constant (See below for details.)
rowbytes - Number of bytes in a row, including whatever padding is necessary to satisfy alignment requirements for row starts. The padding will usually, but not always, be zero.
data - Pointer to the data block.

DETAILS

HIC_Draw_DC_Image_Block() is the simplest and preferred method of drawing images and rasters. However, it allows drawing only the entire image stored in the data block, and does not provide for Z-buffering tilted images.

NOTES

This routine is device-independent, in that it can be called for devices of any visual type.

start may be off-screen.

format has one of the following values, with the indicated meanings:


--------------------------------------------------------------------------
Image_MAPPED_8   One byte per pixel, used as index into current color       
                 map.                                                       
Image_MAPPED_16  Two bytes per pixel, used as 16-bit index into current     
                 color map.                                                 
Image_RGB        Three bytes per pixel, giving red, green, and blue         
                 values in order.                                           
Image_ARGB       Four bytes per pixel, giving alpha, red, green, and blue   
                 values in order.                                           
Image_RGBA       Four bytes per pixel, giving red, blue, green, and alpha   
                 values in order.                                           
--------------------------------------------------------------------------

Currently, the alpha value is used as a stencil. That is, pixels with A=0 are not drawn and pixels with A not zero are drawn.

See also:
Draw_DC_Image

void Draw_DC_Image HT_Rendition *  nr,
HT_DC_Point *  start,
HT_DC_Point *  end,
int  hoffset,
char  format,
int  rowbytes,
void **  rasters,
const int  pattern,
HT_Driver_Color *  contr_clr,
HT_IMAGE *  db_image
 

Draws a generalized image.

Parameters:
nr - Rendition. Passed by reference
start - Upper-left corner of image on display. Passed by reference
end - Lower-right corner. Passed by reference
hoffset - Byte offset of each image scan line in the data block.
format - Image formatsymbolic constant (See below for details.)
rowbytes - Number of bytes in a row, including whatever padding is necessary to satisfy alignment requirements for row starts. The padding will usually, but not always, be zero.
rasters - Pointer to an array of pointers to successive scan lines in the data block.
pattern - For internal use. Should be set to FP_SOLID.
contr_clr - For internal use. Should be set to null.
db_image - Pointer to internal structure in HOOPS that holds an image.

DETAILS

HIC_Draw_DC_Image() is a more general image drawing routine. It would be used to draw a sub-block of the stored image, or to apply Z-buffering to a tilted image.

In HIC_Draw_DC_Image() , the array of pointers rasters, and the hoffset argument allow for drawing a sub-image of a stored image. Because it has both start and end parameters, it allows for drawing a tilted image that may be subject to Z-buffer comparison, when Z-buffering is in effect. However, Z-buffering of tilted images works only for images consisting of a single scan line, with (start - y) = (end - y). Z-buffering results are unpredictable for multi-line tilted images.

NOTES

This routine is device-independent, in that it can be called for devices of any visual type.

start may be off-screen.

format has one of the following values, with the indicated meanings:


--------------------------------------------------------------------------
Image_MAPPED_8   One byte per pixel, used as index into current color       
                 map.                                                       
Image_MAPPED_16  Two bytes per pixel, used as 16-bit index into current     
                 color map.                                                 
Image_RGB        Three bytes per pixel, giving red, green, and blue         
                 values in order.                                           
Image_ARGB       Four bytes per pixel, giving alpha, red, green, and blue   
                 values in order.                                           
Image_RGBA       Four bytes per pixel, giving red, blue, green, and alpha   
                 values in order.                                           
--------------------------------------------------------------------------

Currently, the alpha value is used as a stencil. That is, pixels with A=0 are not drawn and pixels with A not zero are drawn.

See also:
Draw_DC_Image_Block
Main Index

HOOPS/3dGS I.M. Interface

     << Back      Full Index      Forward >>