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 / dvimgr / setrule.h < prev    next >
Text File  |  1993-08-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. /* Modified for use with MGR             04-Aug-1993  lcs          */
  10. /*--------------------------------------------------------------------*/
  11.  
  12.  
  13. void
  14. setrule(height, width, update_h)
  15. register UNSIGN32 height, width;
  16. register BOOLEAN update_h;
  17.  
  18. {   /* draw a rule with bottom left corner at (h,v) */
  19.  
  20.     if ((height > 0) && (width > 0))        /* non-empty rule */
  21.  
  22. #if    BBNBITGRAPH
  23. #if    DECWINDOWS || MGR_OSK   /* lcs */    /* top left corner at (h,v)*/
  24.     fillrect(hh - xscreen, vv - yscreen - rulepxl(height,conv),
  25.          rulepxl(width,conv)  ,  rulepxl(height,conv));
  26. #else
  27.     fillrect(hh + xscreen, YSIZE - vv + yscreen,
  28.              rulepxl(width,conv)  ,  rulepxl(height,conv));     
  29. #endif
  30. #else
  31.     fillrect(hh, YSIZE-vv, 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.