Files
sirh/venv/lib/python3.12/site-packages/PIL/__pycache__/ImageText.cpython-312.pyc

213 lines
20 KiB
Plaintext
Raw Normal View History

2026-04-29 11:52:03 +02:00
<EFBFBD>
<00><><EFBFBD>i<EFBFBD>H<00><01><><00>ddlmZddlZddlZddlmZmZmZddlm Z ddl
m Z e je jze jzZGd<07>de<07>ZGd <09>d
ee<00>ZGd <0B>d ee<00>Zy) <0A>)<01> annotationsN)<03>AnyStr<74>Generic<69>
NamedTuple<EFBFBD>)<01> ImageFont)<01>_Inkc<01>6<00>eZdZUded<ded<ded<ded<y) <09>_Line<6E>float<61>x<>y<>str<74>anchor<6F> str | bytes<65>textN)<04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__annotations__<5F><00><00>J/home/fatima/modif/sirh/venv/lib/python3.12/site-packages/PIL/ImageText.pyr r s<00><00> <0C>H<EFBFBD> <0C>H<EFBFBD> <0F>K<EFBFBD>
<15>rr c<01>L<00>eZdZUgZded<dZdZ d dd<05>Zd d<06>Zy)
<EFBFBD>_Wrapz list[AnyStr]<5D>linesrNc<01><><00>||_||_||_||_|jj}t |t
<00>rdnd}|}t jt |t
<00>rdnd|<05>D<00>]P}t jt |t
<00>rdnd|<08>} | rm|j|<07>s<00>n%t| <09>D]I\}
}|
dk7r|j|<06>sn.|xjt|<07>z c_
|t|<07>d}<08>K|}||z} |jj| |j<00>d|kr| }<07><>|r|j|<07>sn<>t|<08>} |j<00>}| t|<08>z
|_|jj||j<00>d|kDr|<04> d } t| <0A><00>n|}<07><01>S|r|j|<07>||jd|_y)
N<EFBFBD>rz\s*\S+s\s*\S+z
[^\S\n]*\ns
[^\S\n]*\nr<00>zWord does not fit within line)r<00>width<74>height<68>font<6E>
isinstancer<00>re<72>findall<6C>add_line<6E> enumerate<74>position<6F>len<65> _get_bbox<6F>lstrip<69>offset<65>
ValueError<EFBFBD>remaining_text)<0E>selfrr r!r"<00>
input_text<EFBFBD> emptystring<6E>line<6E>word<72>newlines<65>i<>new_line<6E>original_length<74>msgs r<00>__init__z_Wrap.__init__s<><00><00>#'<27><04> <09><1A><04>
<EFBFBD><1C><04> <0B><18><04> <09><19>Y<EFBFBD>Y<EFBFBD>^<5E>^<5E>
<EFBFBD>&<26>z<EFBFBD>3<EFBFBD>7<>b<EFBFBD>S<EFBFBD> <0B><1A><04><16>J<EFBFBD>J<EFBFBD>#<23>J<EFBFBD><03>4<>I<EFBFBD>*<2A>j<EFBFBD>
<EFBFBD>& $<24>D<EFBFBD><1A>z<EFBFBD>z<EFBFBD>!+<2B>J<EFBFBD><03>!<<3C> <0A>.<2E>RV<52><0E>H<EFBFBD><18><1B>}<7D>}<7D>T<EFBFBD>*<2A><19>(<28><18>2<>-<2D>G<EFBFBD>A<EFBFBD>t<EFBFBD><18>A<EFBFBD>v<EFBFBD>d<EFBFBD>m<EFBFBD>m<EFBFBD>K<EFBFBD>&@<40><1D><18>M<EFBFBD>M<EFBFBD>S<EFBFBD><14>Y<EFBFBD>.<2E>M<EFBFBD><1F><03>D<EFBFBD> <09> <0B>,<2C>D<EFBFBD> -<2D>
#<23><04><1B>d<EFBFBD>{<7B>H<EFBFBD><13>y<EFBFBD>y<EFBFBD>"<22>"<22>8<EFBFBD>T<EFBFBD>Y<EFBFBD>Y<EFBFBD>7<><01>:<3A>e<EFBFBD>C<><1F><04><18><14>D<EFBFBD>M<EFBFBD>M<EFBFBD>$<24>/<2F><15>!<21>$<24>i<EFBFBD>O<EFBFBD><17>;<3B>;<3B>=<3D>D<EFBFBD>)<29>C<EFBFBD><04>I<EFBFBD>5<>D<EFBFBD>K<EFBFBD><13>y<EFBFBD>y<EFBFBD>"<22>"<22>4<EFBFBD><14><19><19>3<>A<EFBFBD>6<><15>><3E><17><<3C>9<>C<EFBFBD>$<24>S<EFBFBD>/<2F>)<29><15><17>D<EFBFBD>G& $<24>J<14><14> <0A> <0A>d<EFBFBD>#<23>&0<><14><1D><1D><1F>&A<><04>rc<01>x<00>|j|gz}|j<00>e|jj|<02><01>dj}|jj ||j <00>d}||z|jkDry||_|xjt|<01>|jzz c_d|_ y)N)r<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FrT)
rr!r<00>_splitrr*r"r(r)r,)r/r2r<00> last_line_y<5F>last_line_heights rr&z_Wrap.add_lineRs<><00><00><14>
<EFBFBD>
<EFBFBD>d<EFBFBD>V<EFBFBD>#<23><05> <0F>;<3B>;<3B> "<22><1E>)<29>)<29>*<2A>*<2A><15>*<2A>7<><02>;<3B>=<3D>=<3D>K<EFBFBD>#<23>y<EFBFBD>y<EFBFBD>2<>2<>4<EFBFBD><14><19><19>C<>A<EFBFBD>F<> <1C><1A>-<2D>-<2D><04> <0B> <0B>;<3B><1C><1A><04>
<EFBFBD> <0C> <0A> <0A><13>T<EFBFBD><19>T<EFBFBD>[<5B>[<5B>0<>0<> <0A><17><04> <0B>r<00>NN)
rz Text[AnyStr]r <00>intr!<00>
int | Noner"<00> Font | None<6E>return<72>None)r2rrD<00>bool) rrrrrr(r,r9r&rrrrrs_<00><00><1C>E<EFBFBD><<3C><1C><10>H<EFBFBD> <0E>F<EFBFBD> "<22> <20> 7B<01><1A>7B<01><13>7B<01><1B> 7B<01>
<1A> 7B<01>
<0E> 7B<01>r rrc<01><><00>eZdZ d d d<02>Zd d<03>Zddd<04>Zdd<05>Z d dd<06>Zdd<07>Z d dd<08>Z d dd <09>Z
d dd
<EFBFBD>Z y)<19>TextNc<01><><00>||_|xstj<00>|_||_||_||_||_||_d|_ d|_
d|_ y)a<>
:param text: String to be drawn.
:param font: Either an :py:class:`~PIL.ImageFont.ImageFont` instance,
:py:class:`~PIL.ImageFont.FreeTypeFont` instance,
:py:class:`~PIL.ImageFont.TransposedFont` instance or ``None``. If
``None``, the default font from :py:meth:`.ImageFont.load_default`
will be used.
:param mode: The image mode this will be used with.
:param spacing: The number of pixels between lines.
:param direction: Direction of the text. It can be ``"rtl"`` (right to left),
``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
Requires libraqm.
:param features: A list of OpenType font features to be used during text
layout. This is usually used to turn on optional font features
that are not enabled by default, for example ``"dlig"`` or
``"ss01"``, but can be also used to turn off default font
features, for example ``"-liga"`` to disable ligatures or
``"-kern"`` to disable kerning. To get all supported
features, see `OpenType docs`_.
Requires libraqm.
:param language: Language of the text. Different languages may use
different glyph shapes or ligatures. This parameter tells
the font which language the text is in, and to apply the
correct substitutions as appropriate, if available.
It should be a `BCP 47 language code`_.
Requires libraqm.
FrN) rr<00> load_defaultr"<00>mode<64>spacing<6E> direction<6F>features<65>language<67>embedded_color<6F> stroke_width<74> stroke_fill)r/rr"rKrLrMrNrOs rr9z Text.__init__as\<00><00>J!<21><04> <09><18>4<>I<EFBFBD>2<>2<>4<><04> <09><18><04> <09><1E><04> <0C>"<22><04><0E> <20><04> <0A> <20><04> <0A>#<23><04><1B>#$<24><04><19>(,<2C><04>rc<01>H<00>|jdvr d}t|<01><00>d|_y)z?
Use embedded color glyphs (COLR, CBDT, SBIX).
)<02>RGB<47>RGBAz3Embedded color supported only in RGB and RGBA modesTN)rKr-rP)r/r8s r<00> embed_colorzText.embed_color<6F>s'<00><00> <10>9<EFBFBD>9<EFBFBD>O<EFBFBD> +<2B>G<>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21>"<22><04>rc<01> <00>||_||_y)a 
:param width: The width of the text stroke.
:param fill: Color to use for the text stroke when drawing. If not given, will
default to the ``fill`` parameter from
:py:meth:`.ImageDraw.ImageDraw.text`.
N)rQrR)r/r <00>fills r<00>strokez Text.stroke<6B>s<00><00>"<22><04><19><1F><04>rc<01><<00>|jdvry|jryy)N)<04>1<>P<>I<>Fr[rU<00>L)rKrP)r/s r<00> _get_fontmodezText._get_fontmode<64>s!<00><00> <0F>9<EFBFBD>9<EFBFBD>,<2C> ,<2C><16> <11> <20> <20><19>rc <01>8<00>t|jtj<00>r d}t |<04><00>|j
dvr d}t |<04><00>|<03>t |||<02>}<05>n<>t|jtj<00>s d}t |<04><00>|<02> d}t |<04><00>t|t<00>rd}n|\}}|j}t ||||<07>}|dk(r<>|jsytj|j<00>}|jrX|t|d<07>k(r d }t |<04><00>|dz}|jj|<08>
<EFBFBD>}t ||||<07>}|jr<01>X||_n<>|jr d }t |<04><00>tj|j<00>}|jsP||k(r d }t |<04><00>|dz }|jj|<08>
<EFBFBD>}|} t ||||<07>}|js<01>P|dz}||jjk7r!|jj|<08>
<EFBFBD>|_ }|jr<>t!|j|j|j"|j$|j
|j&|j(<00> <0B>}
|j*|
_|j,|
_|j.|
_nd}
t|j0t<00>rd nd } | j3|j4<00>|_|
S)a
Wrap text to fit within a given width.
:param width: The width to fit within.
:param height: An optional height limit. Any text that does not fit within this
will be returned as a new :py:class:`.Text` object.
:param scaling: An optional directive to scale the text, either "grow" as much
as possible within the given dimensions, or "shrink" until it
fits. It can also be a tuple of (direction, limit), with an
integer limit to stop scaling at.
:returns: An :py:class:`.Text` object, or None.
zTransposedFont not supported)N<>ltrzOnly ltr direction supportedNz$'scaling' only supports FreeTypeFontz'scaling' requires 'height'r<00>shrinkzText could not be scaled)<01>size)rr"rKrLrMrNrO<00>
<EFBFBD>
)r#r"r<00>TransposedFontr-rMr<00> FreeTypeFontrr.<00>math<74>ceilrd<00>max<61> font_variant<6E>floorrHrKrLrNrOrPrQrRr<00>joinr) r/r r!<00>scalingr8<00>wrap<61>limitr"rd<00> last_wrapr<00>newlines rrpz Text.wrap<61>s<><00><00>& <16>d<EFBFBD>i<EFBFBD>i<EFBFBD><19>!9<>!9<> :<3A>0<>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21> <0F>><3E>><3E><1D> .<2E>0<>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21> <12>?<3F><18><14>u<EFBFBD>f<EFBFBD>-<2D>D<EFBFBD><1D>d<EFBFBD>i<EFBFBD>i<EFBFBD><19>)?<3F>)?<3F>@<40><<3C><03> <20><13>o<EFBFBD>%<25><15>~<7E>3<><03> <20><13>o<EFBFBD>%<25><19>'<27>3<EFBFBD>'<27><19><05>!(<28><0E><07><15><17>9<EFBFBD>9<EFBFBD>D<EFBFBD><18><14>u<EFBFBD>f<EFBFBD>d<EFBFBD>3<>D<EFBFBD><16>(<28>"<22><1B>*<2A>*<2A><1F><1B>y<EFBFBD>y<EFBFBD><14><19><19>+<2B><04><1A>)<29>)<29><1B>s<EFBFBD>5<EFBFBD>!<21>}<7D>,<2C>8<><03>(<28><13>o<EFBFBD>-<2D><18>A<EFBFBD>I<EFBFBD>D<EFBFBD><1F>9<EFBFBD>9<EFBFBD>1<>1<>t<EFBFBD>1<><<3C>D<EFBFBD> <20><14>u<EFBFBD>f<EFBFBD>d<EFBFBD>;<3B>D<EFBFBD> <1B>)<29>)<29>!<21><04> <09><17>&<26>&<26>4<>C<EFBFBD>$<24>S<EFBFBD>/<2F>)<29><1B>z<EFBFBD>z<EFBFBD>$<24>)<29>)<29>,<2C><04><1E>-<2D>-<2D><1B>u<EFBFBD>}<7D>8<><03>(<28><13>o<EFBFBD>-<2D><18>A<EFBFBD>I<EFBFBD>D<EFBFBD><1F>9<EFBFBD>9<EFBFBD>1<>1<>t<EFBFBD>1<><<3C>D<EFBFBD> $<24>I<EFBFBD> <20><14>u<EFBFBD>f<EFBFBD>d<EFBFBD>;<3B>D<EFBFBD><1F>-<2D>-<2D><15><01> <09><04><17>4<EFBFBD>9<EFBFBD>9<EFBFBD>><3E>><3E>)<29> $<24> <09> <09> 6<> 6<>D<EFBFBD> 6<> A<>D<EFBFBD>I<EFBFBD> <20><04> <0F> <1E> <1E><17><19>(<28>(<28><19>Y<EFBFBD>Y<EFBFBD><19>Y<EFBFBD>Y<EFBFBD><1C> <0C> <0C><1E>.<2E>.<2E><1D><1D><1D><1D><1D><1D><0E>D<EFBFBD>#'<27>"5<>"5<>D<EFBFBD> <1F> $<24> 1<> 1<>D<EFBFBD> <1D>#<23>/<2F>/<2F>D<EFBFBD> <1C><17>D<EFBFBD>$<24>T<EFBFBD>Y<EFBFBD>Y<EFBFBD><03>4<>$<24>%<25><07><1B>L<EFBFBD>L<EFBFBD><14><1A><1A>,<2C><04> <09><13> rc<01>8<00>t|jt<00>rd|jv}nd|jv}|r d}t|<02><00>|jj |j|j <00>|j|j|j<00>S)a<>
Returns length (in pixels with 1/64 precision) of text.
This is the amount by which following text should be offset.
Text bounding box may extend past the length in some fonts,
e.g. when using italics or accents.
The result is returned as a float; it is a whole number if using basic layout.
Note that the sum of two lengths may not equal the length of a concatenated
string due to kerning. If you need to adjust for kerning, include the following
character and subtract its length.
For example, instead of::
hello = ImageText.Text("Hello", font).get_length()
world = ImageText.Text("World", font).get_length()
helloworld = ImageText.Text("HelloWorld", font).get_length()
assert hello + world == helloworld
use::
hello = (
ImageText.Text("HelloW", font).get_length() -
ImageText.Text("W", font).get_length()
) # adjusted for kerning
world = ImageText.Text("World", font).get_length()
helloworld = ImageText.Text("HelloWorld", font).get_length()
assert hello + world == helloworld
or disable kerning with (requires libraqm)::
hello = ImageText.Text("Hello", font, features=["-kern"]).get_length()
world = ImageText.Text("World", font, features=["-kern"]).get_length()
helloworld = ImageText.Text(
"HelloWorld", font, features=["-kern"]
).get_length()
assert hello + world == helloworld
:return: Either width for horizontal text, or height for vertical text.
rerfz&can't measure length of multiline text)
r#rrr-r"<00> getlengthr`rMrNrO)r/<00> multiliner8s r<00>
get_lengthzText.get_lengths<><00><00>T <16>d<EFBFBD>i<EFBFBD>i<EFBFBD><13> %<25><1C><04> <09> <09>)<29>I<EFBFBD><1D><14><19><19>*<2A>I<EFBFBD> <14>:<3A>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21><13>y<EFBFBD>y<EFBFBD>"<22>"<22> <10>I<EFBFBD>I<EFBFBD> <10> <1E> <1E> <20> <10>N<EFBFBD>N<EFBFBD> <10>M<EFBFBD>M<EFBFBD> <10>M<EFBFBD>M<EFBFBD> 
<EFBFBD>
rc <01><><00>|<02>|jdk(rdnd}nt|<02>dk7r d}t|<05><00>|<04>Pt|jt
<00>r|jj d<06>n|jj d<07>}t|<04>dk(rt|d |d||d <00>gS|dd
vr|jdk7r d }t|<05><00>|j<00>}|jjd |d|j|j|j<00>d |jz|jz}|d}g} |jdk(r0|d }
|D]$} | jt|
||| <0B><00>|
|z }
<EFBFBD>&| Sg} d } |D]\} |jj!| ||j|j|j<00>}| j|<0E>t#| |<0E>} <0A>^|ddk(r|t|<04>dz
|zdz z}n|ddk(r|t|<04>dz
|zz}d}|D<00>]<5D>} |d }
|dz }| | |z
}|dvrn&|dk(r |
|dz z }
n|dk(r|
|z }
n d}t|<05><00>|dk(<00>r"|d k7<00>r|t|<04>dz
k7<00>r
t| t
<00>r| j d<17>n| j d<18>}t|<11>dkDr<>|d dk(r |
| dz z}
n |d dk(r|
| z}
|D<00>cgc]?}|jj!|||j|j|j<00><00><02>A}}d|dz}| t%|<13>z
}d }|D]>}| jt|
|||<12><00>|
|||t|<11>dz
z zz }
|dz }<15>@||z }<08><01>i|d dk(r |
|dz z}
n |d dk(r|
|z}
| jt|
||| <0B><00>||z }<08><01><>| Scc}w)N<>ttb<74>lt<6C>larz#anchor must be a 2 character stringrerfrr<00>tbz'anchor not supported for multiline text<78>Ar<<00>mg@<40>dr;)<02>left<66>justify<66>center<65>rightz4align must be "left", "center", "right" or "justify"r<><00> <20> <20>r<>l)rMr)r-r#rr<00>splitr r`r"<00>getbboxrNrOrQrL<00>appendrurk<00>sum)r/<00>xyr<00>alignrr8<00>fontmode<64> line_spacing<6E>top<6F>partsr<73>r2<00>widths<68> max_width<74>
line_width<EFBFBD>idx<64>width_difference<63>wordsr3<00> word_widths<68> word_anchorr5s rr=z Text._splitGss<00><00> <12>><3E>!<21>^<5E>^<5E>u<EFBFBD>4<>T<EFBFBD>$<24>F<EFBFBD> <10><16>[<5B>A<EFBFBD> <1D>7<>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21> <10>=<3D><1E>d<EFBFBD>i<EFBFBD>i<EFBFBD><13>-<2D><15> <09> <09><0F><0F><04>%<25><19>Y<EFBFBD>Y<EFBFBD>_<EFBFBD>_<EFBFBD>U<EFBFBD>+<2B> <12>
<0F>u<EFBFBD>:<3A><11>?<3F><19>"<22>Q<EFBFBD>%<25><12>A<EFBFBD><15><06><05>a<EFBFBD><08>9<>:<3A> :<3A> <11>!<21>9<EFBFBD><04> <1C><14><1E><1E>5<EFBFBD>!8<>;<3B>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21><17>%<25>%<25>'<27><08> <10>I<EFBFBD>I<EFBFBD> <1D> <1D><13><18><14><14> <0A> <0A><14> <0A> <0A><14>!<21>!<21>  <0E><10> <11><13><1F><1F> <20><13>l<EFBFBD>l<EFBFBD> <1B> <15><11><11>e<EFBFBD><03><12><05> <0F>><3E>><3E>U<EFBFBD> "<22><15>a<EFBFBD>5<EFBFBD>D<EFBFBD><1D> %<25><04><15> <0C> <0C>U<EFBFBD>4<EFBFBD><13>f<EFBFBD>d<EFBFBD>;<3B><<3C><14> <0C>$<24><04> %<25>\<15> <0C>U<18>F<EFBFBD> <20>I<EFBFBD><1D> 7<><04>!<21>Y<EFBFBD>Y<EFBFBD>0<>0<><18>(<28>D<EFBFBD>N<EFBFBD>N<EFBFBD>D<EFBFBD>M<EFBFBD>M<EFBFBD>4<EFBFBD>=<3D>=<3D><12>
<EFBFBD><17> <0A> <0A>j<EFBFBD>)<29><1F> <09>:<3A>6<> <09>  7<><16>a<EFBFBD>y<EFBFBD>C<EFBFBD><1F><13><03>E<EFBFBD>
<EFBFBD>Q<EFBFBD><0E>,<2C>6<><13><<3C><<3C><03><17><01><19>c<EFBFBD>!<21><13><03>E<EFBFBD>
<EFBFBD>Q<EFBFBD><0E>,<2C>6<>6<><03><14>C<EFBFBD><1D>9 $<24><04><19>!<21>u<EFBFBD><04><13>q<EFBFBD><08><03>#,<2C>v<EFBFBD>c<EFBFBD>{<7B>#:<3A> <20><19>/<2F>/<2F><18><1A>h<EFBFBD>&<26><18>,<2C>s<EFBFBD>2<>2<>D<EFBFBD><1A>g<EFBFBD>%<25><18>,<2C>,<2C>D<EFBFBD>P<>C<EFBFBD>$<24>S<EFBFBD>/<2F>)<29><1A>Y<EFBFBD>&<26>(<28>A<EFBFBD>-<2D><1B>s<EFBFBD>5<EFBFBD>z<EFBFBD>A<EFBFBD>~<7E>-<2D>,6<>d<EFBFBD>C<EFBFBD>+@<40><04>
<EFBFBD>
<EFBFBD>3<EFBFBD><0F>d<EFBFBD>j<EFBFBD>j<EFBFBD>QU<51>FV<46><1A><1B>5<EFBFBD>z<EFBFBD>A<EFBFBD>~<7E>!<21>!<21>9<EFBFBD><03>+<2B> <20>I<EFBFBD><03>O<EFBFBD>3<>D<EFBFBD>#<23>A<EFBFBD>Y<EFBFBD>#<23>-<2D> <20>I<EFBFBD>-<2D>D<EFBFBD>).<2E> '<1A>!%<25>!<21>I<EFBFBD>I<EFBFBD>/<2F>/<2F> $<24> (<28> $<24><0E><0E> $<24> <0A> <0A> $<24> <0A> <0A> <1E> '<1A> <0B> '<1A>'*<2A>F<EFBFBD>1<EFBFBD>I<EFBFBD>o<EFBFBD> <0B>+4<>s<EFBFBD>;<3B>7G<37>+G<>(<28><1D><01>$)<29>#<23>D<EFBFBD>!<21>L<EFBFBD>L<EFBFBD><15>t<EFBFBD>S<EFBFBD>+<2B>t<EFBFBD>)L<>M<> <20>K<EFBFBD><01>N<EFBFBD>5E<35><13>U<EFBFBD><1A>VW<56><1E>5X<35>$X<>X<>D<EFBFBD><1D><11>F<EFBFBD>A<EFBFBD>#<23><1C>|<7C>+<2B><03> <20><1A>!<21>9<EFBFBD><03>#<23><18>,<2C>s<EFBFBD>2<>2<>D<EFBFBD><1B>A<EFBFBD>Y<EFBFBD>#<23>%<25><18>,<2C>,<2C>D<EFBFBD><15> <0C> <0C>U<EFBFBD>4<EFBFBD><13>f<EFBFBD>d<EFBFBD>;<3B><<3C><13>|<7C>#<23><03>s9 $<24>v<15> <0C><>9 's<00>$AOc <01><><00>|xs |jj||j<00>|j|j|j
|j |<03>S)N)r"r<>r`rMrNrOrQ)r/rr"rs rr*zText._get_bbox<6F>sP<00><00><15>!<21><04> <09> <09>*<2A>*<2A> <10> <10> <1E> <1E> <20> <10>N<EFBFBD>N<EFBFBD> <10>M<EFBFBD>M<EFBFBD> <10>M<EFBFBD>M<EFBFBD> <10> <1D> <1D> <12>
<EFBFBD>
rc <01>D<00>d}|j|||<03>D]<5D>\}}}}|j||<02><02>}|d|z|d|z|d|z|d|zf}|<04>|}<04>>t|d|d<00>t|d|d<00>t|d|d<00>t|d|d<00>f}<04><>|<04>J<00>|S)a<>
Returns bounding box (in pixels) of text.
Use :py:meth:`get_length` to get the offset of following text with 1/64 pixel
precision. The bounding box includes extra margins for some fonts, e.g. italics
or accents.
:param xy: The anchor coordinates of the text.
:param anchor: The text anchor alignment. Determines the relative location of
the anchor to the text. The default alignment is top left,
specifically ``la`` for horizontal text and ``lt`` for
vertical text. See :ref:`text-anchors` for details.
:param align: For multiline text, ``"left"``, ``"center"``, ``"right"`` or
``"justify"`` determines the relative alignment of lines. Use the
``anchor`` parameter to specify the alignment to ``xy``.
:return: ``(left, top, right, bottom)`` bounding box
N)rrrrr<)r=r*<00>minrk) r/r<>rr<><00>bboxr rr<00> bbox_lines r<00>get_bboxz Text.get_bbox<6F>s<><00><00>0:><3E><04>"&<26>+<2B>+<2B>b<EFBFBD>&<26>%<25>"@<40> <12> <1E>A<EFBFBD>q<EFBFBD>&<26>$<24><1C><0E><0E>t<EFBFBD>F<EFBFBD><0E>;<3B>I<EFBFBD><19>!<21> <0C>q<EFBFBD> <20><19>!<21> <0C>q<EFBFBD> <20><19>!<21> <0C>q<EFBFBD> <20><19>!<21> <0C>q<EFBFBD> <20> <0E>I<EFBFBD> <14>|<7C> <20><04><18><04>Q<EFBFBD><07><19>1<EFBFBD><1C>.<2E><17><04>Q<EFBFBD><07><19>1<EFBFBD><1C>.<2E><17><04>Q<EFBFBD><07><19>1<EFBFBD><1C>.<2E><17><04>Q<EFBFBD><07><19>1<EFBFBD><1C>.<2E> <12><04> <12>$<14><1F><1F><1F><13> r)NrT<00>NNN)rrr"rCrKrrLr rM<00>
str | NonerNzlist[str] | NonerOr<>rDrE)rDrE)rN)r r rXz _Ink | NonerDrE)rDrr@)r rAr!rBrozstr | tuple[str, int] | NonerDzText[AnyStr] | None)rDr )<04>rrNr<4E>N)
r<EFBFBD><00>tuple[float, float]rr<>r<>rrzlist[str] | list[bytes] | NonerDz list[_Line])rrr"rCrr<>rD<00>!tuple[float, float, float, float])r<>Nr<4E>)r<>r<>rr<>r<>rrDr<>) rrrr9rVrYr`rprwr=r*r<>rrrrHrH`sd<00><00>!<21><19><1A> $<24>%)<29>#<23>1-<2D><14>1-<2D><1A>1-<2D><12> 1-<2D>
<17> 1-<2D> <1E> 1-<2D>#<23>1-<2D><1D>1-<2D>
<0E>1-<2D>f#<23> <20><17>"<22>04<30> ]<14><12>]<14><1B>]<14>.<2E> ]<14>
<1D> ]<14>~7
<EFBFBD>v#)<29>!<21><1B>04<30> z<15> <1F>z<15><1B>z<15><13> z<15>
.<2E> z<15>
<15> z<15>zQU<01> 
<EFBFBD><1F> 
<EFBFBD>'2<> 
<EFBFBD>CM<EFBFBD> 
<EFBFBD> *<2A> 
<EFBFBD>#)<29>!<21><1B> ,<14> <1F>,<14><1B>,<14><13> ,<14>
+<2B> ,rrH)<12>
__future__rrir$<00>typingrrrrr<00>_typingr rhrg<00>Fontr rrHrrr<00><module>r<>sl<00><01>"<22> <0B> <09>.<2E>.<2E><17><19><10><1A><1A>Y<EFBFBD>3<>3<>3<>i<EFBFBD>6N<36>6N<36>N<><04><16>J<EFBFBD><16>I<14>G<EFBFBD>F<EFBFBD>O<EFBFBD>I<14>X\<14>7<EFBFBD>6<EFBFBD>?<3F>\r