Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/site-packages/PIL/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/site-packages/PIL/__pycache__/PSDraw.cpython-312.pyc

�

&ٜg���T�ddlmZddlZddlmZmZddlmZGd�d�ZdZ	d	Z
d
Zy)�)�annotationsN)�IO�
TYPE_CHECKING�)�EpsImagePluginc�v�eZdZdZd
dd�Zd
dd�Zdd�Zdd�Zdd�Zdd�Z	dd	�Z
erd
dlm
Z
	d
							dd�Zy)�PSDrawzi
    Sets up printing to the given file. If ``fp`` is omitted,
    ``sys.stdout.buffer`` is assumed.
    Nc�J�|stjj}||_y�N)�sys�stdout�buffer�fp)�selfrs  �5/usr/local/lib/python3.12/site-packages/PIL/PSDraw.py�__init__zPSDraw.__init__"s������"�"�B����c��|jjd�|jjt�|jjt�|jjd�i|_y)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'sS��	
���
�
�
!�	
�	
���
�
�i� ����
�
�f�����
�
�&�'�)+��rc��|jjd�t|jd�r|jj�yy)z-Ends printing. (Write PostScript DSC footer.)s%%%EndDocument
restore showpage
%%End
�flushN)rr�hasattrr)rs r�end_documentzPSDraw.end_document7s3�����
�
�A�B��4�7�7�G�$��G�G�M�M�O�%rc���t|d�}||jvr/|jjd||fz�d|j|<|jjd||fz�y)z~
        Selects which font to use.

        :param font: A PostScript font name
        :param size: Size in points.
        �UTF-8s#/PSDraw-%s ISOLatin1Encoding /%s E
rs/F0 %d /PSDraw-%s F
N)�bytesrrr)r�font�size�
font_bytess    r�setfontzPSDraw.setfont=sd���4��)�
��T�\�\�)��G�G�M�M�7�:�z�:R�R�
�()�D�L�L��$����
�
�.�$�
�1C�C�Drc�J�|jjdg|�|��z�y)z�
        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).
        s%d %d %d %d Vl
N�rr)r�xy0�xy1s   r�linezPSDraw.lineNs"��	
���
�
�)�L�c�L�C�L�8�9rc�@�|jjd|z�y)z�
        Draws a rectangle.

        :param box: A tuple of four integers, specifying left, bottom, width and
           height.
        s%d %d M 0 %d %d Vr
Nr')r�boxs  r�	rectanglezPSDraw.rectangleVs��	
���
�
�-��3�4rc���t|d�}dj|jd��}dj|jd��}|jj	d||fzz�y)z�
        Draws text at the given position. You must use
        :py:meth:`~PIL.PSDraw.PSDraw.setfont` before calling this method.
        r s\(�(s\)�)s%d %d M (%s) S
N)r!�join�splitrr)r�xy�text�
text_bytess    rr4zPSDraw.text_s_��
�4��)�
��[�[��!1�!1�$�!7�8�
��[�[��!1�!1�$�!7�8�
����
�
�)�R�:�-�-?�@�Arr)�Imagec��|s|jdk(rd}nd}|jddz|z}|jddz|z}t|d|dz
�}t|d|dz
�}||kDr
||z|z}|}||kDr
||z|z}|}||z
dz|dz}||z
dz|dz}	|jj	d	||	fz�||f|jk7rD||jdz}
||jdz}|jj	d
|
|fz�tj||jdd�|jj	d�y
)z,Draw a PIL image, centered in the given box.�1���dr�Hr��sgsave
%f %f translate
s%f %f scale
�s

grestore
N)�moder#�floatrrr�_save)rr,�im�dpi�x�y�xmax�ymax�dx�dy�sx�sys            r�imagezPSDraw.imagels`��
��w�w�#�~������G�G�A�J��O�c�!���G�G�A�J��O�c�!���S��V�c�!�f�_�%���S��V�c�!�f�_�%���t�8��D��1��A��A��t�8��D��1��A��A��Q�h�!�^�c�!�f�
$���Q�h�!�^�c�!�f�
$�����
�
�1�R��H�<�=�
�q�6�R�W�W���R�W�W�Q�Z��B��R�W�W�Q�Z��B��G�G�M�M�*�b�"�X�5�6����R����"�a�0����
�
�o�&rr)rzIO[bytes] | None�return�None)rz
str | NonerMrN)rMrN)r"�strr#�intrMrN)r(�tuple[int, int]r)rQrMrN)r,�tuple[int, int, int, int]rMrN)r3rQr4rOrMrN)r,rRrBzImage.ImagerCz
int | NonerMrN)�__name__�
__module__�__qualname__�__doc__rrrr%r*r-r4rr>r6rL�rrr	r	s`���
�
,� �E�":�5�B���RV�'�,�'�2=�'�DN�'�	
�'rr	s�/S { show } bind def
/P { moveto show } bind def
/M { moveto } bind def
/X { 0 rmoveto } bind def
/Y { 0 exch rmoveto } bind def
/E {    findfont
        dup maxlength dict begin
        {
                1 index /FID ne { def } { pop pop } ifelse
        } forall
        /Encoding exch def
        dup /FontName exch def
        currentdict end definefont pop
} bind def
/F {    findfont exch scalefont dup setfont
        [ exch /setfont cvx ] cvx bind def
} bind def
s�/Vm { moveto } bind def
/Va { newpath arcn stroke } bind def
/Vl { moveto lineto stroke } bind def
/Vc { newpath 0 360 arc closepath } bind def
/Vr {   exch dup 0 rlineto
        exch dup 0 exch rlineto
        exch neg 0 rlineto
        0 exch neg rlineto
        setgray fill } bind def
/Tm matrix def
/Ve {   Tm currentmatrix pop
        translate scale newpath 0 0 .5 0 360 arc closepath
        Tm setmatrix
} bind def
/Vf { currentgray exch setgray fill setgray } bind def
s�/landscape false def
/errorBUF 200 string def
/errorNL { currentpoint 10 sub exch pop 72 exch moveto } def
errordict begin /handleerror {
    initmatrix /Courier findfont 10 scalefont setfont
    newpath 72 720 moveto $error begin /newerror false def
    (PostScript Error) show errorNL errorNL
    (Error: ) show
        /errorname load errorBUF cvs show errorNL errorNL
    (Command: ) show
        /command load dup type /stringtype ne { errorBUF cvs } if show
        errorNL errorNL
    (VMstatus: ) show
        vmstatus errorBUF cvs show ( bytes available, ) show
        errorBUF cvs show ( bytes used at level ) show
        errorBUF cvs show errorNL errorNL
    (Operand stargck: ) show errorNL /ostargck load {
        dup type /stringtype ne { errorBUF cvs } if 72 0 rmoveto show errorNL
    } forall errorNL
    (Execution stargck: ) show errorNL /estargck load {
        dup type /stringtype ne { errorBUF cvs } if 72 0 rmoveto show errorNL
    } forall
    end showpage
} def end
)�
__future__rr�typingrrr>rr	rr�ERROR_PSrWrr�<module>r[s5��"#�
�$��o'�o'�~
�	�:
��2�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists