+
     i  c                  sV    ^ RI Ht ^ RIt^ RIHt ^RIHt Rt ! R R4      tRt	R	t
R
tR# )i    )annotationsN)IO)EpsImagePluginFc                  s    ] tR t^tRtRR R lltRR R lltR R ltR	 R
 ltR R lt	R R lt
R R lt]'       d   ^RIHt RR R lltRtR# )PSDrawz]
Sets up printing to the given file. If ``fp`` is omitted,
``sys.stdout.buffer`` is assumed.
Nc                    V ^8  d   QhRRRR/# )   fpzIO[bytes] | NonereturnNone Zformat   "1/usr/lib64/python3.14/site-packages/PIL/PSDraw.py__annotate__PSDraw.__annotate__%   s      + t     c                	sV    V'       g   \         P                  P                  pWn        R # N)sysZstdoutZbufferr   )selfr      &&r   __init__ZPSDraw.__init__%   s    ""Br   c               r   )r   idz
str | Noner   r   r	   r
   r   r   r   r   *   s     , , ,t ,r   c                s    V P                   P                  R4       V P                   P                  \        4       V P                   P                  \        4       V P                   P                  R4       / V n        R# )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   r   r   r   begin_documentZPSDraw.begin_document*   sS     	!	
 	i f&')+r   c               s    V ^8  d   QhRR/# )r   r   r   r	   r
   r   r   r   r   :   s      d r   c                s    V P                   P                  R4       \        V P                   R4      '       d   V P                   P                  4        R# R# )z-Ends printing. (Write PostScript DSC footer.)s%   %%EndDocument
restore showpage
%%End
flushN)r   r   Zhasattrr   )r   s   &r   end_documentZPSDraw.end_document:   s6    AB477G$$GGMMO %r   c               $    V ^8  d   QhRRRRRR/# )r   fontstrsizeZintr   r   r	   r
   r   r   r   r   @   s&     E EC Es Et Er   c                s    \        VR4      pW0P                  9  d3   V P                  P                  RW33,          4       ^V P                  V&   V P                  P                  RW#3,          4       R# )z^
Selects which font to use.

:param font: A PostScript font name
:param size: Size in points.
UTF-8s#   /PSDraw-%s ISOLatin1Encoding /%s E
s   /F0 %d /PSDraw-%s F
N)bytesr   r   r   )r   r   r    Z
font_bytes   &&& r   setfontZPSDraw.setfont@   s^     4)
\\)GGMM7::RR ()DLL$.$1CCDr   c               s$    V ^8  d   QhRRRRRR/# )r   xy0tuple[int, int]xy1r   r   r	   r
   r   r   r   r   Q   s!     : : :o :$ :r   c                sT    V P                   P                  R. VOVO5,          4       R# )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   r%   r'   s   &&&r   lineZPSDraw.lineQ   s"     	)LcLCL89r   c               r   )r   boxtuple[int, int, int, int]r   r   r	   r
   r   r   r   r   Y   s     5 56 54 5r   c                sJ    V P                   P                  RV,          4       R# )zi
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   r*   r   r   	rectangleZPSDraw.rectangleY   s     	-34r   c               r   )r   xyr&   textr   r   r   r	   r
   r   r   r   r   b   s&     B B Bc Bd Br   c                s    \        VR4      pRP                  VP                  R4      4      pRP                  VP                  R4      4      pV P                  P	                  RW3,           ,          4       R# )zr
Draws text at the given position. You must use
:py:meth:`~PIL.PSDraw.PSDraw.setfont` before calling this method.
r!   s   \(s   (s   \)s   )s   %d %d M (%s) S
N)r"   ZjoinZsplitr   r   )r   r-   r.   Z
text_bytesr#   r   r.   ZPSDraw.textb   s]    
 4)
[[!1!1$!78
[[!1!1$!78
)R--?@Ar   )Imagec               s(    V ^8  d   QhRRRRRRRR/# )	r   r*   r+   imzImage.Imagedpiz
int | Noner   r   r	   r
   r   r   r   r   o   s,     ' ','2='DN'	'r   c                s   V'       g   VP                   R8X  d   ^pM^dpVP                  ^ ,          ^H,          V,          pVP                  ^,          ^H,          V,          p\        V^,          V^ ,          ,
          4      p\        V^,          V^,          ,
          4      pWF8  d   WV,          V,          pTpWW8  d   WG,          V,          pTpWd,
          ^,          V^ ,          ,           pWu,
          ^,          V^,          ,           p	V P                  P	                  RW3,          4       WE3VP                  8w  dV   WBP                  ^ ,          ,          p
WRP                  ^,          ,          pV P                  P	                  RW3,          4       \
        P                  ! W P                  R^ 4       V P                  P	                  R4       R# )z,Draw a PIL image, centered in the given box.Z1s   gsave
%f %f translate
s   %f %f scale
 s
   
grestore
N)Zmoder    Zfloatr   r   r   Z_save)r   r*   r0   r1   ZxZyZxmaxZymaxZdxZdyZsxZsys   &&&&        r   imageZPSDraw.imageo   sH   
 ww#~GGAJOc!GGAJOc!SVc!f_%SVc!f_%81AA81AAh!^c!f$h!^c!f$1RH<=6RWWWWQZBWWQZBGGMM*bX56R"a0o&r   )r   r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   r   r$   r)   r,   r.   TYPE_CHECKINGr2   r/   r3   Z__static_attributes__r	   r   r   r   r      s>    

, E":5B ' '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
)Z
__future__r    r   Ztypingr   r2   r   r4   r   r   r   ZERROR_PSr	   r   r   <module>r5      s:   " # 
  o' o'~	:
2r   