home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / DVI_MGR / dvimgr_s.lzh / dvi_fbi_hh / INCLUDES / setrule.h < prev   
Text File  |  1993-05-06  |  1KB  |  41 lines

  1. /* -*-C-*- setrule.h */
  2. /*-->setrule*/
  3. /**********************************************************************/
  4. /****************************** setrule *******************************/
  5. /**********************************************************************/
  6.  
  7. /*--------------------------------------------------------------------*/
  8. /* Modified for use with DVIDECW driver     (09.02.90)              */
  9. /*--------------------------------------------------------------------*/
  10.  
  11.  
  12. void
  13. setrule(height, width, update_h)
  14. register UNSIGN32 height, width;
  15. register BOOLEAN update_h;
  16.  
  17. {   /* draw a rule with bottom left corner at (h,v) */
  18.  
  19.     if ((height > 0) && (width > 0))        /* non-empty rule */
  20.  
  21. #if    BBNBITGRAPH
  22. #if    DECWINDOWS                      /* top left corner at (h,v)*/
  23.     fillrect(hh - xscreen, vv - yscreen - rulepxl(height,conv),
  24.         rulepxl(width,conv)  ,  rulepxl(height,conv));     
  25. #else
  26.     fillrect(hh + xscreen, YSIZE - vv + yscreen,
  27.         rulepxl(width,conv)  ,  rulepxl(height,conv));     
  28. #endif
  29. #else
  30.     fillrect(hh, YSIZE-vv,
  31.         rulepxl(width,conv), rulepxl(height,conv));
  32. #endif
  33.  
  34.     if (update_h)
  35.     {
  36.     h += (INT32)width;
  37.     hh += rulepxl(width, conv);
  38.     hh = fixpos(hh-lmargin,h,conv) + lmargin;
  39.     }
  40. }
  41.