home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / printer / dvi2pcl.lha / drawrule.c < prev    next >
C/C++ Source or Header  |  1992-11-25  |  2KB  |  54 lines

  1. /* $Log:    drawrule.c,v $
  2.  * Revision 0.8  92/11/23  19:46:45  19:46:45  bt (Bo Thide')
  3.  * Fixed resolution bug. Portable downloading. Added/changed options. PJXL color support
  4.  * 
  5.  * Revision 0.7  92/11/13  02:41:29  02:41:29  bt (Bo Thide')
  6.  * More bug fixes and improvements. Support for PaintJet XL
  7.  * 
  8.  * Revision 0.6  92/11/10  21:47:45  21:47:45  bt (Bo Thide')
  9.  * Bug fixes. Added -R option. Better font handling.
  10.  * 
  11.  * Revision 0.5  92/11/09  16:25:32  16:25:32  bt (Bo Thide')
  12.  * Rewrite of dospecial.c. Extended \special support
  13.  * 
  14.  * Revision 0.4  92/11/08  02:45:48  02:45:48  bt (Bo Thide')
  15.  * Changed to portable bit manipulations. Replaced strrstr for non-POSIX compliant C. Fixed numerous bugs. Added support for more \special's.
  16.  * 
  17.  * Revision 0.3  92/08/24  12:45:39  12:45:39  bt (Bo Thide')
  18.  * Fixed 8 bit (dc font) support.
  19.  * 
  20.  * Revision 0.2  92/08/23  17:28:56  17:28:56  bt (Bo Thide')
  21.  * Source cleaned up.  Changed certain function calls.  Removed globals.
  22.  * 
  23.  * Revision 0.1  92/08/22  23:58:47  23:58:47  bt (Bo Thide')
  24.  * First Release.
  25.  *  */
  26.  
  27. #include <stdio.h>
  28. #include "globals.h"
  29. #include "pcl.h"
  30.  
  31. static char rcsid[] = "$Header: drawrule.c,v 0.8 92/11/23 19:46:45 bt Exp $";
  32.  
  33. /*
  34.  * This procedure draws a rule (a solid black rectangle) of a pixels
  35.  * in height and b pixels in width. Positioning is again essential.
  36.  * The LaserJet+ makes this very easy.
  37.  */
  38. void drawrule(bitfile, a, b, hh, vv)
  39. FILE    *bitfile;
  40. long    a, b, hh, vv;
  41.  
  42. #ifdef DEBUG
  43.     fprintf(stderr,"\ndrawrule: a = %ld, b = %ld\n", a, b);
  44. #endif /* DEBUG */
  45.  
  46.     fprintf(bitfile, PCL4_MOVE_V_POSITION, vv + v_offset - a + 1 );
  47.     v_posed = FALSE;
  48.     if(!h_posed)
  49.         fprintf(bitfile, PCL4_MOVE_H_POSITION, hh + h_offset);
  50.     h_posed = FALSE;
  51.     fprintf(bitfile, PCL4_DRAWRULE, a, b);
  52. }
  53.