§
    œ"²c}  ã                   ó@   — d dl Z ddlmZ  G d„ d¦  «        ZdZdZdZdS )	é    Né   )ÚEpsImagePluginc                   óH   — e Zd ZdZdd„Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
dd
„ZdS )Ú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 nw xY w|| _        d S ©N)ÚsysÚstdoutÚbufferÚAttributeErrorÚfp)Úselfr   s     ú,/usr/lib/python3/dist-packages/PIL/PSDraw.pyÚ__init__zPSDraw.__init__    sL   € Øð 	 ð Ý”ZÔ&��øÝ!ð  ð  ð  Ý”Z���ð øøøàˆŒˆˆs   „ –/®/c                 óø   — | j                              d¦  «         | j                              t          ¦  «         | j                              t          ¦  «         | j                              d¦  «         i | _        dS )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_documentzPSDraw.begin_document(   sk   € ð 	Œ�Šð!ñ	
ô 	
ð 	
ð 	Œ�Š•iÑ Ô Ð ØŒ�Š•fÑÔÐØŒ�ŠÐ&Ñ'Ô'Ð'ØˆŒˆˆó    c                 óš   — | j                              d¦  «         t          | j         d¦  «        r| j                              ¦   «          dS dS )z-Ends printing. (Write PostScript DSC footer.)s%   %%EndDocument
restore showpage
%%End
ÚflushN)r   r   Úhasattrr   )r   s    r   Úend_documentzPSDraw.end_document8   sH   € àŒ�ŠÐAÑBÔBÐBÝ�4”7˜GÑ$Ô$ð 	ØŒG�MŠM‰OŒOˆOˆOˆOð	ð 	r   c                 óÈ   — t          |d¦  «        }|| j        vr)| j                             d||fz  ¦  «         d| j        |<   | j                             d||fz  ¦  «         dS )z~
        Selects which font to use.

        :param font: A PostScript font name
        :param size: Size in points.
        úUTF-8s#   /PSDraw-%s ISOLatin1Encoding /%s E
r   s   /F0 %d /PSDraw-%s F
N)Úbytesr   r   r   )r   ÚfontÚsizes      r   ÚsetfontzPSDraw.setfont>   sn   € õ �T˜7Ñ#Ô#ˆØ�t”|Ð#Ð#àŒG�MŠMÐAÀTÈ4ÀLÑPÑQÔQÐQØ!"ˆDŒL˜ÑàŒ�ŠÐ.°$¸°Ñ=Ñ>Ô>Ð>Ð>Ð>r   c                 óJ   — | j                              dg |¢|¢R z  ¦  «         dS )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©r   r   )r   Úxy0Úxy1s      r   ÚlinezPSDraw.lineM   s.   € ð 	Œ�ŠÐ)¨L¨c¨L°C¨L¨LÑ8Ñ9Ô9Ð9Ð9Ð9r   c                 ó@   — | j                              d|z  ¦  «         dS )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   Ú	rectanglezPSDraw.rectangleU   s$   € ð 	Œ�ŠÐ-°Ñ3Ñ4Ô4Ð4Ð4Ð4r   c                 ó  — t          |d¦  «        }d                     |                     d¦  «        ¦  «        }d                     |                     d¦  «        ¦  «        }||fz  }| j                             d|z  ¦  «         dS )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Úsplitr   r   )r   ÚxyÚtexts      r   r1   zPSDraw.text^   sx   € õ
 �T˜7Ñ#Ô#ˆØ�{Š{˜4Ÿ:š: dÑ+Ô+Ñ,Ô,ˆØ�{Š{˜4Ÿ:š: dÑ+Ô+Ñ,Ô,ˆØ
ˆtˆg‰ˆØŒ�ŠÐ)¨BÑ.Ñ/Ô/Ð/Ð/Ð/r   c                 ó´  — |s|j         dk    rd}nd}|j        d         dz  |z  }|j        d         dz  |z  }t          |d         |d         z
  ¦  «        }t          |d         |d         z
  ¦  «        }||k    r
||z  |z  }|}||k    r
||z  |z  }|}||z
  dz  |d         z   }||z
  dz  |d         z   }	| j                             d	||	fz  ¦  «         ||f|j        k    r?||j        d         z  }
||j        d         z  }| j                             d
|
|fz  ¦  «         t          j        || j        dd¦  «         | j                             d¦  «         dS )z,Draw a PIL image, centered in the given box.Ú1éÈ   éd   r   éH   r   é   é   s   gsave
%f %f translate
s   %f %f scale
Ns
   
grestore
)Úmoder!   Úfloatr   r   r   Ú_save)r   r)   ÚimÚdpiÚxÚyÚxmaxÚymaxÚdxÚdyÚsxÚsys               r   ÚimagezPSDraw.imagei   s}  € ð ð 	ØŒw˜#Š~ˆ~Ø��à�àŒG�AŒJ˜‰O˜cÑ!ˆØŒG�AŒJ˜‰O˜cÑ!ˆå�S˜”V˜c !œf‘_Ñ%Ô%ˆÝ�S˜”V˜c !œf‘_Ñ%Ô%ˆØˆtŠ8ˆ8Ø�D‘˜1‘ˆAØˆAØˆtŠ8ˆ8Ø�D‘˜1‘ˆAØˆAØ�Q‰h˜!‰^˜c !œfÑ$ˆØ�Q‰h˜!‰^˜c !œfÑ$ˆØŒ�ŠÐ1°R¸°HÑ<Ñ=Ô=Ð=Øˆqˆ6�R”WÒÐà�R”W˜Q”Z‘ˆBØ�R”W˜Q”Z‘ˆBØŒG�MŠMÐ*¨b°"¨XÑ5Ñ6Ô6Ð6ÝÔ˜R ¤¨$°Ñ2Ô2Ð2ØŒ�Š�oÑ&Ô&Ð&Ð&Ð&r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r"   r'   r*   r1   rF   © r   r   r   r      s¥   € € € € € ðð ð
ð ð ð ðð ð ð ð ð ð ð?ð ?ð ?ð:ð :ð :ð5ð 5ð 5ð	0ð 	0ð 	0ð'ð 'ð 'ð 'ð 'ð 'r   r   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
)r	   Ú r   r   r   r   ÚERROR_PSrK   r   r   ú<module>rN      sl   ðð$ €
€
€
à Ð Ð Ð Ð Ð ðl'ð l'ð l'ð l'ð l'ñ l'ô l'ð l'ðx€	ð:
€ð2€€€r   