Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - fg_drawmatrix http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                              fg_drawmatrix

   Usage
   #include <fg.h>
   void  far  fg_drawmatrix(fg_color_t  color, int mode,  int  mask,  int
   rotation,  fg_coord_t x, fg_coord_t y, const char *p,  fg_const_pbox_t
   b, fg_const_pbox_t clipbox);

   Description
   Draw  matrix of dots fg_box_width(b) x fg_box_height(b).The matrix  is
   drawn  from  top  to  bottom,  i.e. the first  row  pointed  to  by  p
   corresponds  to the top row displayed. Only the bits that are  1s  are
   output  to the display. This is so that icons can be  overlaid  across
   what's already on screen. If a different result is desired you can  do
   a fg_fillbox prior to calling this routine.

   color,mode,mask     The color, mode and mask to use for the matrix.
   rotation FG_ROTx    about x,y where x,y is the lower left
                       corner of where matrix is to be written.
   p                   Pointer to data to be written, which is an array
   fg_matrix_size(b) bytes long. Bit 0 of the byte
   corresponds to the rightmost pixel, bit 7 to the
   leftmost.

   b Enclosing box. b[FG_X1] = b[FG_Y1] = 0.
   clipbox The clipping rectangle.

   Example
   {
   static fg_box_t bat_mouse_box = {0,0,26,11};
   static char bat_mouse_cursor[48] = {
   /* This is drawn with the X's set to WHITE, blanks are unchanged. */

   0x00,0x0a,0x00,0x00,/*            X X            */
   0x00,0x0e,0x00,0x00,/*            XXX            */
   0x02,0x15,0x08,0x00,/*        X  X X X  X        */
   0x07,0x9f,0x3c,0x00,/*      XXXX XXXXX XXXX      */
   0x0f,0xff,0xfe,0x00,/*    XXXXXXXXXXXXXXXXXXX    */
   0x1f,0xff,0xff,0x00,/*   XXXXXXXXXXXXXXXXXXXXX   */
   0x3f,0xff,0xff,0x80,/*  XXXXXXXXXXXXXXXXXXXXXXX  */
   0x7f,0xff,0xff,0xc0,/* XXXXXXXXXXXXXXXXXXXXXXXXX */
   0xc7,0x3b,0x9c,0x60,/*  XX  XXX XXX XXX XXX  XX  */
   0x82,0x11,0x08,0x20,/*    X   X  X   X  X   X    */
   0x00,0x11,0x00,0x00,/*           X   X           */
   0x00,0x2a,0x80,0x00 /*         X X   X X         */
   };
   fg_drawmatrix(FG_WHITE, FG_MODE_SET, ~0, FG_ROT0, 0, 0,
   bat_mouse_cursor, bat_mouse_box, fg.displaybox);
   }


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson