GrPrint


(c) Andy Drummond (grungemold@tiscali.co.uk)


1. Introduction


These routines are designed to simplify the writing of text and the drawing of items on a printer at defined locations, given in inches, millimetres, etc. You can write text left, right or centre justified about the location given, in any of the four attitudes - L-R, Up-Down, R-L upside-down, and Down-Up. You can draw straight lines either one pixel wide, the default, or in any absolute thickness, allowing for non- isotropic printers (different pixels per inch in horizontal or vertical directions).

Colours are not specified, black being used by default. They can be set at any time after choosePrinter() has been called to select the printer and get the printer metrics. chooseprinter() need only be called once but multiple calling will have no further effect. Thus it can be called when you want to print, but if a printer has already been selected then the call will be ignored. finishPrinter() will forget the current printer and allow choosePrinter() to select another.

Coordinate points are, by default, in inches absolute regardless of printer. These can be changed to centimetres, millimetres or proportions of the width. Thickness of lines are in thousands of an inch, hundredths of centimetres or or tenths of millimetres.

Issue 2 June 2005

New procedures including filled shapes, specific color-setting routines and an image-printing routine have been added. A bug with finishPrinter() followed by another choosePrinter() has been sorted courtesy of Wolf.




2. Routines
   choosePrinter
   demoPrinter
   finishPrinter
   printDIB
   printFilledPolygon
   printFilledRectangle
   printLine
   printPage
   printPolygon
   printRectangle
   printString
   printTextCentral
   printTextLeft
   printTextRight
   printThickLine
   setPrinterPenColor
   setPrinterTextColor
   setPrinterUnits

 

... continue 3. Alphabetical Listing of All Routines, From A to Z