Files
old-saburly-wagtail-web/env/lib/python3.10/site-packages/PIL/__pycache__/PSDraw.cpython-310.pyc

128 lines
6.0 KiB
Plaintext
Raw Normal View History

2024-08-27 20:33:44 +02:00
o
<00><><EFBFBD>fG<00>@sJddlmZddlZddlmZddlmZGdd<07>d<07>ZdZd Z d
Z
dS) <0B>)<01> annotationsN)<01> TYPE_CHECKING<4E>)<01>EpsImagePluginc@sveZdZdZd(dd<04>Zd(d)d d
<EFBFBD>Zd*d d <0C>Zd+dd<12>Zd,dd<17>Zd-dd<1B>Z d.dd<1F>Z
e r2d d!l m Z  d(d/d&d'<27>ZdS)0<>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<00>N)<05>sys<79>stdout<75>buffer<65>AttributeError<6F>fp)<02>selfr <00>r<00>L/home/amir/Desktop/saburlyweb/env/lib/python3.10/site-packages/PIL/PSDraw.py<70>__init__"s  
<02>
zPSDraw.__init__<5F>id<69>
str | None<6E>return<72>NonecCs:|j<00>d<01>|j<00>t<02>|j<00>t<03>|j<00>d<02>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 <00>write<74> EDROFF_PS<50>VDI_PS<50>isofont)r rrrr<00>begin_document*s<04>   
zPSDraw.begin_documentcCs*|j<00>d<01>t|jd<02>r|j<00><03>dSdS)z-Ends printing. (Write PostScript DSC footer.)s%%%EndDocument
restore showpage
%%End
<EFBFBD>flushN)r r<00>hasattrr)r rrr<00> end_document:s  <04>zPSDraw.end_document<6E>font<6E>str<74>size<7A>intcCsJt|d<01>}||jvr|j<02>d||f<00>d|j|<|j<02>d||f<00>dS)z~
Selects which font to use.
:param font: A PostScript font name
:param size: Size in points.
<20>UTF-8s#/PSDraw-%s ISOLatin1Encoding /%s E
rs/F0 %d /PSDraw-%s F
N)<04>bytesrr r)r rr<00>
font_bytesrrr<00>setfont@s


<04>
zPSDraw.setfont<6E>xy0<79>tuple[int, int]<5D>xy1cCs|j<00>dg|<01>|<02>R<00>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<EFBFBD>r r)r r%r'rrr<00>lineQsz PSDraw.line<6E>box<6F>tuple[int, int, int, int]cCs|j<00>d|<00>dS)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 r*rrr<00> rectangleYszPSDraw.rectangle<6C>xy<78>textcCsDt|d<01>}d<02>|<03>d<03><01>}d<04>|<03>d<05><01>}|j<03>d||f<00>dS)z<>
Draws text at the given position. You must use
:py:meth:`~PIL.PSDraw.PSDraw.setfont` before calling this method.
r!s\(<28>(s\)<29>)s%d %d M (%s) S
N)r"<00>join<69>splitr r)r r-r.<00>
text_bytesrrrr.bs
z PSDraw.textr)<01>Image<67>im<69> Image.Image<67>dpi<70>
int | Nonec Cs0|s |jdkr
d}nd}|jdd|}|jdd|}t|d|d<00>}t|d|d<00>}||kr>|||}|}||krJ|||}|}||d|d}||d|d} |j<03>d || f<00>||f|jkr<>||jd}
||jd} |j<03>d
|
| f<00>t<05>||jd d<04>|j<03>d <0C>d S)z,Draw a PIL image, centered in the given box.<2E>1<><31><00>dr<00>Hr<00><00>sgsave
%f %f translate
s %f %f scale
<EFBFBD>s
grestore
N)<07>moder<00>floatr rr<00>_save) r r*r5r7<00>x<>y<>xmax<61>ymax<61>dx<64>dy<64>sx<73>syrrr<00>imageos.
  z PSDraw.imager)rrrr)rr)rrrr rr)r%r&r'r&rr)r*r+rr)r-r&r.rrr)r*r+r5r6r7r8rr)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrrr$r)r,r.rr?r4rKrrrrrs
 





<10>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<EFBFBD>/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<EFBFBD>/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
) <0B>
__future__rr<00>typingrr?rrrr<00>ERROR_PSrrrr<00><module>s