文件操作 - PSDraw.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/PIL/__pycache__/PSDraw.cpython-311.pyc
编辑文件内容
� �"�c} � �@ � d dl Z ddlmZ G d� d� � ZdZdZdZdS ) � N� )�EpsImagePluginc �H � e Zd ZdZdd�Zdd�Zd� Zd� Zd� Zd� Z d � Z dd �ZdS )�PSDrawz{ Sets up printing to the given file. If ``fp`` is omitted, ``sys.stdout.buffer`` or ``sys.stdout`` is assumed. Nc �v � |s/ t j j }n# t $ r t j }Y nw xY w|| _ d S �N)�sys�stdout�buffer�AttributeError�fp)�selfr s �,/usr/lib/python3/dist-packages/PIL/PSDraw.py�__init__zPSDraw.__init__ sL � �� � ��Z�&����!� � � ��Z���� ��������s � �/�/c � � | j � d� � | j � t � � | j � t � � | j � d� � i | _ dS )z=Set up printing of a document. (Write PostScript DSC header.)sD %!PS-Adobe-3.0 save /showpage { } def %%EndComments %%BeginDocument s %%EndProlog N)r �write� EDROFF_PS�VDI_PS�isofont)r �ids r �begin_documentzPSDraw.begin_document( sk � � �� � � !� � � � �� � �i� � � ��� � �f������ � �&�'�'�'������ c � � | j � d� � t | j d� � r| j � � � dS dS )z-Ends printing. (Write PostScript DSC footer.)s% %%EndDocument restore showpage %%End �flushN)r r �hasattrr )r s r �end_documentzPSDraw.end_document8 sH � ��� � �A�B�B�B��4�7�G�$�$� ��G�M�M�O�O�O�O�O� � r c �� � t |d� � }|| j vr)| j � d||fz � � d| j |<