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_box_width http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                               fg_box_width

   Usage
   #include <fg.h>
   fg_coord_t far fg_box_width(fg_const_pbox_t b)

   Description
   Returns the height of the box in pixels.

   Example
   #include <stdio.h>
   #include <fg.h>

   void label_graph(char *label_string)
   {
   fg_box_t label_box;
   size_t len = strlen(label_string);

   fg_box_cpy(label_box, fg.charbox);

   label_box    [FG_X1]   =   (fg_box_width(fg.displaybox)   -   len    *
   fg_box_width(fg.charbox)))/2;
   label_box    [FG_X2]   =   (fg_box_width(fg.displaybox)   +   len    *
   fg_box_width(fg.charbox)))/2;

   /* Clear a space for it. */
   fg_fillbox(FG_BLACK, FG_MODE_SET, ~0, label_box);
   fg_puts(FG_WHITE, FG_MODE_SET, ~0, FG_ROT0,
   label_box[FG_X1], label_box [FG_Y1],
   label_string, label_box);
   }


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