Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/PIL/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/PIL/__pycache__/PSDraw.cpython-310.pyc
o

Z#�a?�@s2ddlZddlmZGdd�d�ZdZdZdZdS)	�N�)�EpsImagePluginc@sVeZdZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
ddd�ZdS)�PSDrawz{
    Sets up printing to the given file. If ``fp`` is omitted,
    ``sys.stdout.buffer`` or ``sys.stdout`` is assumed.
    NcCs4|sztjj}Wntytj}Ynw||_dS�N)�sys�stdout�buffer�AttributeError�fp)�selfr
�r�,/usr/lib/python3/dist-packages/PIL/PSDraw.py�__init__ s
�
zPSDraw.__init__cCs:|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�idrrr
�begin_document(s�
zPSDraw.begin_documentcCs*|j�d�t|jd�r|j��dSdS)z-Ends printing. (Write PostScript DSC footer.)s%%%EndDocument
restore showpage
%%End
�flushN)r
r�hasattrr)rrrr
�end_document8s�zPSDraw.end_documentcCsJt|d�}||jvr|j�d||f�d|j|<|j�d||f�dS)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)�bytesrr
r)r�font�sizerrr
�setfont>s



zPSDraw.setfontcCs|j�dg|�|�R�dS)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�xy1rrr
�lineMszPSDraw.linecCs|j�d|�dS)a8
        Draws a rectangle.

        :param box: A 4-tuple of integers whose order and function is currently
                    undocumented.

                    Hint: the tuple is passed into this format string:

                    .. code-block:: python

                        %d %d M %d %d 0 Vr

        s%d %d M %d %d 0 Vr
Nr)r�boxrrr
�	rectangleUs
zPSDraw.rectanglecCsHt|d�}d�|�d��}d�|�d��}||f7}|j�d|�dS)z�
        Draws text at the given position. You must use
        :py:meth:`~PIL.PSDraw.PSDraw.setfont` before calling this method.
        rs\(�(s\)�)s%d %d M (%s) S
N)r�join�splitr
r)r�xy�textrrr
r(ds


zPSDraw.textcCs0|s|jdkr
d}nd}|jdd|}|jdd|}t|d|d�}t|d|d�}||kr>|||}|}||krJ|||}|}||d|d}||d|d}	|j�d	||	f�||f|jkr�||jd}
||jd}|j�d
|
|f�t�||jdd�|j�d�dS)
z,Draw a PIL image, centered in the given box.�1���dr�Hr��sgsave
%f %f translate
s%f %f scale
Ns

grestore
)�moder�floatr
rr�_save)rr!�im�dpi�x�y�xmax�ymax�dx�dy�sx�syrrr
�imageos.
zPSDraw.imager)�__name__�
__module__�__qualname__�__doc__rrrrr r"r(r<rrrr
rs

rs�/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 neg 0 exch rlineto
        exch neg 0 rlineto
        0 exch rlineto
        100 div setgray fill 0 setgray } 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�rrrr�ERROR_PSrrrr
�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit