The Python Imaging Library |
![]() |
|
Copyright © 1997 by Fredrik Lundh <fredrik@pythonware.com> | ||
Updated 17 Aug 1997 |
< The ImageWin Module | The PSDraw Class >
The PSDraw class provides print support for Postscript printers. You can print text, graphics and images through this module.
PSDraw( image ) sets up printing to the given file. If file is omitted, sys.stdout is assumed.
begin_document() sets up printing of a document.
Ends printing.
line( from, to ) draws a line between the two points. Coordinates are given in Postscript point coordinates (72 points per inch, (0, 0) is the lower left corner of the page).
rectangle( box ) draws a rectangle.
text( position, text ) or text( position, text, alignment ) draws text at the given position. You must use setfont before calling this method.
setfont( font, size ) selects which font to use. The font argument is a Postscript font name, the size argument is given in points.
setink( ink ) selects the pixel value to use with subsequent operations.
setfill( onoff ) selects if subsequent rectangle operations should draw filled rectangles or just outlines.
< The ImageWin Module | The PSDraw Class >