PSDraw
Module¶
The PSDraw
module provides simple print support for PostScript
printers. You can print text, graphics and images through this module.
- class PIL.PSDraw.PSDraw(fp=None)[source]¶
Sets up printing to the given file. If
fp
is omitted,sys.stdout.buffer
orsys.stdout
is assumed.- line(xy0, xy1)[source]¶
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)[source]¶
Draws a rectangle.
- Parameters:
box – A tuple of four integers, specifying left, bottom, width and height.