home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FSGFX.ZIP / G_HFADER.C < prev    next >
C/C++ Source or Header  |  1990-03-06  |  406b  |  22 lines

  1. /* g_hfader.c */
  2. /* draw a horizontal fader */
  3.  
  4. #include "mygraph.h"
  5.  
  6. g_hfader(int x,int y,int fvalue)
  7. {
  8.     struct rect knob;
  9.     struct rect body;
  10.     knob.pt1.x = x + 2 + fvalue;
  11.     knob.pt1.y = y + 2;
  12.     knob.pt2.x = knob.pt1.x + 20;
  13.     knob.pt2.y = knob.pt1.y + 6;
  14.     body.pt1.x = x;
  15.     body.pt1.y = y;
  16.     body.pt2.x = body.pt1.x + 152;
  17.     body.pt2.y = body.pt1.y + 10;
  18.     g_rect(knob);
  19.     g_rect(body);
  20. }
  21.  
  22.