- 安装
- 关于 Pillow
- 指南
- API参考
- Image Module
- ImageChops (“Channel Operations”) Module
- ImageColor Module
- ImageDraw Module
- ImageEnhance Module
- ImageFile Module
- ImageFilter Module
- ImageFont Module
- ImageGrab Module (Windows-only)
- ImageMath Module
- ImageOps Module
- ImagePalecodee Module
- ImagePath Module
- ImageQt Module
- ImageSequence Module
- ImageStat Module
- ImageTk Module
- ImageWin Module (Windows-only)
- PSDraw Module
- PIL Package (autodoc of remaining modules)
- 附录
- PIL 原始帮助文档
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) Sets up printing to the given file. If file is omicodeed,
sys.stdout
is assumed.begin_document
(id=None)Set up printing of a document. (Write Postscript DSC header.)
end_document
()Ends printing. (Write Postscript DSC footer.)
image
(box, im, dpi=None)Draw a PIL image, centered in the given box.
line
(xy0, xy1)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.
参数: box – A 4-tuple of integers whose order and function is currently undocumented.
Hint: the tuple is passed into this format string:
%d %d M %d %d 0 Vr
setfont
(font, size)Selects which font to use.
参数: - font – A Postscript font name
- size – Size in points.
setink
(ink)This has been in the PIL API for ages but was never implemented.
text
(xy, text)Draws text at the given position. You must use
setfont()
before calling this method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论