Files
intellecton/venv/lib/python3.12/site-packages/PIL/__pycache__/PSDraw.cpython-312.pyc
T

129 lines
7.8 KiB
Plaintext
Raw Normal View History

Ë
ß¼jPãóT—ddlmZddlZddlmZddlmZdZGd„d«Zd Z d
Z
d Z y) é)Ú annotationsN)ÚIOé)ÚEpsImagePluginFcóv—eZdZdZd
dd„Zd
dd„Zdd„Zdd„Zdd„Zdd„Z dd „Z
e rd
d l 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 úM/home/antigravity/intellecton/venv/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_document:s3€à �‰�
‰
Ð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.
zUTF-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Úlinez PSDraw.lineQs"€ð
�‰�
‰
Ð)¨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.rectangleYs€ð
�‰�
‰
Ð-°Ñ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.
zlatin-1s\(ó(s\)ó)s%d %d M (%s) S
N)rÚjoinÚsplitrr)rÚxyÚtextÚ
text_bytess rr2z PSDraw.textbs_€ô ˜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«t j ||jd d«|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.imageps`€ñ
Ø�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 | NonerKrL)rKrL)r Ústrr!ÚintrKrL)r&útuple[int, int]r'rOrKrL)r*útuple[int, int, int, int]rKrL)r1rOr2rMrKrL)r*rPr@z Image.ImagerAz
int | NonerKrL)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrrr#r(r+r2Ú
TYPE_CHECKINGr<r4rJ©rrrrs`„ñô
ô
,ó ó Eó":ó5ó BñÝðRVð'Ø,ð'Ø2=ð'ØDNð'à
ô'rrs×/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