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

131 lines
12 KiB
Plaintext
Raw Normal View History

2026-04-29 11:52:03 +02:00
<EFBFBD>
<00><><EFBFBD>i<EFBFBD><00><01><><00>ddlmZddlmZGd<04>d<05>ZGd<06>d<07>ZGd<08>d <09>ZGd
<EFBFBD>d <0B>ZGd <0C>d e<07>Zy)<0F>)<01> annotations<6E>)<01>Imagec<01> <00>eZdZdZdd<02>Zdd<03>Zy)<07>HDCz<43>
Wraps an HDC integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
methods.
c<01><00>||_y<00>N<><01>dc)<02>selfr s <20>I/home/fatima/modif/sirh/venv/lib/python3.12/site-packages/PIL/ImageWin.py<70>__init__z HDC.__init__s <00><00><14><04><07>c<01><00>|jSr r
<00>r s r <00>__int__z HDC.__int__"s <00><00><13>w<EFBFBD>w<EFBFBD>rN)r <00>int<6E>return<72>None<6E>rr<00><06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rr<00>rr rrs<00><00><08> <15>rrc<01> <00>eZdZdZdd<02>Zdd<03>Zy)<07>HWNDz<44>
Wraps an HWND integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
methods, instead of a DC.
c<01><00>||_yr <00><01>wnd)r r!s r rz HWND.__init__-s <00><00><16><04>rc<01><00>|jSr r rs r rz HWND.__int__0s <00><00><13>x<EFBFBD>x<EFBFBD>rN)r!rrrrrrrr rr&s<00><00><08> <17>rrc<01>v<00>eZdZdZ d
d d<03>Zd d<04>Z d
d d<05>Zdd<06>Z d
dd<07>Zdd<08>Z dd <09>Z
y)<12>Diba&
A Windows bitmap with the given mode and size. The mode can be one of "1",
"L", "P", or "RGB".
If the display requires a palette, this constructor creates a suitable
palette and associates it with the image. For an "L" image, 128 graylevels
are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
with 20 graylevels.
To make sure that palettes work properly under Windows, you must call the
``palette`` method upon certain events from Windows.
:param image: Either a PIL image, or a mode string. If a mode string is
used, a size must also be given. The mode can be one of "1",
"L", "P", or "RGB".
:param size: If the first argument is a mode string, this
defines the size of the image.
Nc<01>^<00>t|t<00>r|}d}|<02>%d}t|<04><00>|j}|j}|dvrt j |<03>}t
jj||<02>|_ ||_||_|r$t|t<00>rJ<00>|j|<01>yy)N<>z+If first argument is mode, size is required)<04>1<>L<>P<>RGB) <0B>
isinstance<EFBFBD>str<74>
ValueError<EFBFBD>mode<64>sizer<00> getmodebase<73>core<72>display<61>image<67>paste)r r3r/r.<00>msgs r rz Dib.__init__Hs<><00><00> <16>e<EFBFBD>S<EFBFBD> !<21><18>D<EFBFBD><16>E<EFBFBD><13>|<7C>C<><03> <20><13>o<EFBFBD>%<25><18>:<3A>:<3A>D<EFBFBD><18>:<3A>:<3A>D<EFBFBD> <0F>-<2D> -<2D><18>$<24>$<24>T<EFBFBD>*<2A>D<EFBFBD><1A>Z<EFBFBD>Z<EFBFBD>'<27>'<27><04>d<EFBFBD>3<><04>
<EFBFBD><18><04> <09><18><04> <09> <10>!<21>%<25><13>-<2D> -<2D>-<2D> <10>J<EFBFBD>J<EFBFBD>u<EFBFBD> <1D> rc<01>Z<00>t|<01>}t|t<00>rT|jj |<02>} |jj |<03>|jj ||<03>y|jj |<02>y#|jj ||<03>wxYw)a 
Copy the bitmap contents to a device context.
:param handle: Device context (HDC), cast to a Python integer, or an
HDC or HWND instance. In PythonWin, you can use
``CDC.GetHandleAttrib()`` to get a suitable handle.
N)rr+rr3<00>getdc<64>expose<73> releasedc)r <00>handle<6C>
handle_intr s r r8z
Dib.expose]s<><00><00><19><16>[<5B>
<EFBFBD> <15>f<EFBFBD>d<EFBFBD> #<23><15><1A><1A>!<21>!<21>*<2A>-<2D>B<EFBFBD> 5<><14>
<EFBFBD>
<EFBFBD>!<21>!<21>"<22>%<25><14>
<EFBFBD>
<EFBFBD>$<24>$<24>Z<EFBFBD><12>4<> <10>J<EFBFBD>J<EFBFBD> <1D> <1D>j<EFBFBD> )<29><><15>
<EFBFBD>
<EFBFBD>$<24>$<24>Z<EFBFBD><12>4<>s <00>B <00> B*c<01><><00>|<03>d|jz}t|<01>}t|t<00>rV|jj |<04>} |jj |||<03>|jj||<05>y|jj |||<03>y#|jj||<05>wxYw)am
Same as expose, but allows you to specify where to draw the image, and
what part of it to draw.
The destination and source areas are given as 4-tuple rectangles. If
the source is omitted, the entire image is copied. If the source and
the destination have different sizes, the image is resized as
necessary.
N)rr)r/rr+rr3r7<00>drawr9)r r:<00>dst<73>srcr;r s r r=zDib.drawos<><00><00> <0F>;<3B><18>4<EFBFBD>9<EFBFBD>9<EFBFBD>$<24>C<EFBFBD><18><16>[<5B>
<EFBFBD> <15>f<EFBFBD>d<EFBFBD> #<23><15><1A><1A>!<21>!<21>*<2A>-<2D>B<EFBFBD> 5<><14>
<EFBFBD>
<EFBFBD><0F><0F><02>C<EFBFBD><13>-<2D><14>
<EFBFBD>
<EFBFBD>$<24>$<24>Z<EFBFBD><12>4<> <10>J<EFBFBD>J<EFBFBD>O<EFBFBD>O<EFBFBD>J<EFBFBD><03>S<EFBFBD> 1<><31><15>
<EFBFBD>
<EFBFBD>$<24>$<24>Z<EFBFBD><12>4<>s <00> B!<00>!B?c<01>^<00>t|<01>}t|t<00>rU|jj |<02>} |jj |<01>}|jj ||<01>|S|jj |<02>}|S#|jj ||<01>wxYw)at
Installs the palette associated with the image in the given device
context.
This method should be called upon **QUERYNEWPALETTE** and
**PALETTECHANGED** events from Windows. If this method returns a
non-zero value, one or more display palette entries were changed, and
the image should be redrawn.
:param handle: Device context (HDC), cast to a Python integer, or an
HDC or HWND instance.
:return: The number of entries that were changed (if one or more entries,
this indicates that the image should be redrawn).
)rr+rr3r7<00> query_paletter9)r r:r;<00>results r rAzDib.query_palette<74>s<><00><00><19><16>[<5B>
<EFBFBD> <15>f<EFBFBD>d<EFBFBD> #<23><19>Z<EFBFBD>Z<EFBFBD>%<25>%<25>j<EFBFBD>1<>F<EFBFBD> 5<><1D><1A><1A>1<>1<>&<26>9<><06><14>
<EFBFBD>
<EFBFBD>$<24>$<24>V<EFBFBD>V<EFBFBD>4<><16> <0A><1A>Z<EFBFBD>Z<EFBFBD>-<2D>-<2D>j<EFBFBD>9<>F<EFBFBD><15> <0A><><15>
<EFBFBD>
<EFBFBD>$<24>$<24>V<EFBFBD>V<EFBFBD>4<>s <00>B<00>B,c<01>(<00>|j<00>|j|jk7r|j|j<00>}|r'|jj |j
|<02>y|jj |j
<00>y)a<>
Paste a PIL image into the bitmap image.
:param im: A PIL image. The size must match the target region.
If the mode does not match, the image is converted to the
mode of the bitmap image.
:param box: A 4-tuple defining the left, upper, right, and
lower pixel coordinate. See :ref:`coordinate-system`. If
None is given instead of a tuple, all of the image is
assumed.
N)<06>loadr.<00>convertr3r4<00>im)r rF<00>boxs r r4z Dib.paste<74>s`<00><00> <0B><07><07> <09> <0F>9<EFBFBD>9<EFBFBD><02><07><07> <1F><13><1A><1A>D<EFBFBD>I<EFBFBD>I<EFBFBD>&<26>B<EFBFBD> <0E> <10>J<EFBFBD>J<EFBFBD> <1C> <1C>R<EFBFBD>U<EFBFBD>U<EFBFBD>C<EFBFBD> (<28> <10>J<EFBFBD>J<EFBFBD> <1C> <1C>R<EFBFBD>U<EFBFBD>U<EFBFBD> #rc<01>:<00>|jj|<01>y)z<>
Load display memory contents from byte data.
:param buffer: A buffer containing display data (usually
data returned from :py:func:`~PIL.ImageWin.Dib.tobytes`)
N)r3<00> frombytes)r <00>buffers r rIz Dib.frombytes<65>s<00><00> <0A>
<EFBFBD>
<EFBFBD><1C><1C>V<EFBFBD>$rc<01>6<00>|jj<00>S)zy
Copy display memory contents to bytes object.
:return: A bytes object containing display data.
)r3<00>tobytesrs r rLz Dib.tobytes<65>s<00><00> <14>z<EFBFBD>z<EFBFBD>!<21>!<21>#<23>#rr )r3zImage.Image | strr/ztuple[int, int] | Nonerr)r:<00>int | HDC | HWNDrr)r:rMr>ztuple[int, int, int, int]r?<00> tuple[int, int, int, int] | Nonerr)r:rMrr)rFz Image.ImagerGrNrr)rJ<00>bytesrr)rrO) rrrrrr8r=rAr4rIrLrrr r$r$4s<><00><00><08>(HL<01><1E>&<26><1E>.D<><1E> <0A><1E>**<2A>,15<31> 2<> <20>2<>'<27>2<>.<2E> 2<>
<0E> 2<>6<16>6HL<01>$<24><1D>$<24>$D<>$<24> <0A>$<24>,%<25>$rr$c<01>b<00>eZdZdZ d d d<03>Zd d<04>Zdd<05>Zdd<06>Zdd<07>Zdd<08>Z dd <09>Z
dd
<EFBFBD>Z y)<12>Windowz*Create a Window with the given title size.Nc<01>v<00>tjj||j|xsd|xsd<01>|_y)Nr)rr1<00> createwindow<6F>_Window__dispatcher<65>hwnd)r <00>title<6C>width<74>heights r rzWindow.__init__<5F>s1<00><00><1A>J<EFBFBD>J<EFBFBD>+<2B>+<2B> <11>4<EFBFBD>$<24>$<24>e<EFBFBD>j<EFBFBD>q<EFBFBD>&<26>+<2B>A<EFBFBD>
<EFBFBD><04> rc<01>(<00>t|d|<01><00><02>|<02>y)N<>
ui_handle_)<01>getattr)r <00>action<6F>argss r <00> __dispatcherzWindow.__dispatcher<65>s<00><00>,<2C><07><04>
<EFBFBD>6<EFBFBD>(<28>+<2B>,<2C>d<EFBFBD>3rc<01><00>yr r<00>r r <00>x0<78>y0<79>x1<78>y1s r <00>ui_handle_clearzWindow.ui_handle_clear<61><00><00><00> rc<01><00>yr r)r rarbrcrds r <00>ui_handle_damagezWindow.ui_handle_damage<67>rfrc<01><00>yr rrs r <00>ui_handle_destroyzWindow.ui_handle_destroy<6F>rfrc<01><00>yr rr`s r <00>ui_handle_repairzWindow.ui_handle_repair<69>rfrc<01><00>yr r)r rWrXs r <00>ui_handle_resizezWindow.ui_handle_resize<7A>rfrc<01>@<00>tjj<00>yr )rr1<00> eventlooprs r <00>mainloopzWindow.mainloop<6F>s<00><00> <0A>
<EFBFBD>
<EFBFBD><1C><1C>r)<03>PILNN)rVr,rW<00>
int | NonerXrsrr)r\r,r]rrr<00> r rrarrbrrcrrdrrr)
rarrbrrcrrdrrr)rr)rWrrXrrr) rrrrrrTrerhrjrlrnrqrrr rQrQ<00>sT<00><00>4<>RV<01>
<EFBFBD><18>
<EFBFBD>)3<>
<EFBFBD>DN<EFBFBD>
<EFBFBD> <0A>
<EFBFBD>4<> <0A> <0A> <0A> <0A> <0A>rrQc<01>.<00><00>eZdZdZdd<05>fd<02> Zdd<03>Z<05>xZS)<07> ImageWindowz6Create an image window which displays the given image.c<01><><00><01>t|t<00>s t|<01>}||_|j\}}t<00>|<00>|||<04><01>y)N)rWrX)r+r$r3r/<00>superr)r r3rVrWrX<00> __class__s <20>r rzImageWindow.__init__<5F>s><00><><00><19>%<25><13>%<25><17><05>J<EFBFBD>E<EFBFBD><1A><04>
<EFBFBD><1D>
<EFBFBD>
<EFBFBD> <0A><05>v<EFBFBD> <0A><07><18><15>e<EFBFBD>F<EFBFBD><18>;rc<01>D<00>|jj|||||f<04>yr )r3r=r`s r rlzImageWindow.ui_handle_repair<69>s<00><00> <0C>
<EFBFBD>
<EFBFBD><0F><0F><02>R<EFBFBD><12>R<EFBFBD><12>,<2C>-r)rr)r3zImage.Image | DibrVr,rrrt)rrrrrrl<00> __classcell__)rys@r rvrv<00>s<00><><00>@<40><<3C>.rrvN) <09>
__future__rr&rrrr$rQrvrrr <00><module>r}sE<00><01>&#<23><13> <17> <17> <18> <18>U$<24>U$<24>p<1F><1F>@ .<2E>&<26> .r