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

118 lines
8.4 KiB
Plaintext
Raw Normal View History

2024-08-27 20:33:44 +02:00
o
<00><><EFBFBD>fc<00>@sdddlmZddlmZGdd<05>d<05>ZGdd<07>d<07>ZGdd <09>d <09>ZGd
d <0B>d <0B>ZGd d <0A>d e<07>ZdS)<0F>)<01> annotations<6E>)<01>Imagec@<01>$eZdZdZd dd<07>Zd dd <09>Zd
S) <0A>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.
<20>dc<64>int<6E>return<72>NonecC<01>
||_dS<00>N<>r)<02>selfr<00>r<00>N/home/amir/Desktop/saburlyweb/env/lib/python3.10/site-packages/PIL/ImageWin.py<70>__init__<00>
z HDC.__init__cC<01>|jSr r <00>rrrr<00>__int__"<00>z HDC.__int__N)rrr r
<00>r r<00><06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrrrrrr<00>
rc@r) <0A>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.
<20>wndrr r
cCr r <00>r)rrrrrr-rz HWND.__init__cCrr r rrrrr0rz HWND.__int__N)rrr r
rrrrrrr&rrc@sZeZdZdZ ddd d
<EFBFBD>Zd d <0C>Zdd d<0E>Zdd<10>Z dddd<16>Zd dd<1A>Z d!dd<1C>Z
dS)"<22>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.
N<>image<67>Image.Image | str<74>size<7A>"tuple[int, int] | list[int] | Noner r
cCsrt|t<01>r
|}d}n|j}|j}|dvrt<04>|<03>}tj<06>||<02>|_||_||_|r7t|t<01>r0J<00>|<00> |<01>dSdS)N<>)<04>1<>L<>P<>RGB)
<EFBFBD>
isinstance<EFBFBD>str<74>moder$r<00> getmodebase<73>core<72>displayr"<00>paste)rr"r$r-rrrrHs

<04>z Dib.__init__c
CsXt|t<01>r$|j<02>|<01>}z|j<02>|<02>}W|j<02>||<02>|S|j<02>||<02>w|j<02>|<01>}|S)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.
)r+rr"<00>getdc<64>expose<73> releasedc)r<00>handler<00>resultrrrr3Zs
 <10> z
Dib.exposec
Csn|sd|j}t|t<02>r-|j<03>|<01>}z|j<03>|||<03>}W|j<03>||<04>|S|j<03>||<04>w|j<03>|||<03>}|S)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.
)rr)r$r+rr"r2<00>drawr4)rr5<00>dst<73>srcrr6rrrr7ls

 <10>zDib.drawc
CsXt|t<01>r$|j<02>|<01>}z|j<02>|<01>}W|j<02>||<01>|S|j<02>||<01>w|j<02>|<01>}|S)ae
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: A true value if one or more entries were changed (this
indicates that the image should be redrawn).
)r+rr"r2<00> query_paletter4)rr5r6rrrr:<00>s
 <10> zDib.query_palette<74>im<69> Image.Image<67>box<6F> tuple[int, int, int, int] | NonecCsJ|<01><00>|j|jkr|<01>|j<01>}|r|j<03>|j|<02>dS|j<03>|j<05>dS)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>convertr"r1r;)rr;r=rrrr1<00>s   z Dib.paste<74>buffer<65>bytescCs|j<00>|<01>dS)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)r"<00> frombytes)rrArrrrC<00>sz Dib.frombytescCs
|j<00><01>S)zy
Copy display memory contents to bytes object.
:return: A bytes object containing display data.
)r"<00>tobytesrrrrrD<00>s
z Dib.tobytesr )r"r#r$r%r r
)r;r<r=r>r r
)rArBr r
)r rB) rrrrrr3r7r:r1rCrDrrrrr!4s <0C>
 <0C>
 r!c@sZeZdZdZ ddd d <0C>Zd d<0E>Zdd<10>Zdd<12>Zddd<14>Zdd<16>Z dd<18>Z
ddd<1A>Z dS)<1E>Windowz*Create a Window with the given title size.<2E>PILN<4C>titler,<00>width<74>
int | None<6E>heightr r
cCs"tj<01>||j|p d|p d<01>|_dS)Nr)rr/<00> createwindow<6F>_Window__dispatcher<65>hwnd)rrGrHrJrrrr<00>s
<EFBFBD>zWindow.__init__cGst|d|<01><00><02>|<02>S)N<>
ui_handle_)<01>getattr)r<00>action<6F>argsrrr<00> __dispatcher<65>szWindow.__dispatchercC<01>dSr r<00>rr<00>x0<78>y0<79>x1<78>y1rrr<00>ui_handle_clear<61><00>zWindow.ui_handle_clearcCrSr r)rrUrVrWrXrrr<00>ui_handle_damage<67>rZzWindow.ui_handle_damagecCrSr rrrrr<00>ui_handle_destroy<6F>rZzWindow.ui_handle_destroycCrSr rrTrrr<00>ui_handle_repair<69>rZzWindow.ui_handle_repaircCrSr r)rrHrJrrr<00>ui_handle_resize<7A>rZzWindow.ui_handle_resizecCstj<01><02>dSr )rr/<00> eventlooprrrr<00>mainloop<6F>szWindow.mainloop)rFNN)rGr,rHrIrJrIr r
)r r
) rrrrrrLrYr[r\r]r^r`rrrrrE<00>s <0C>
rEcs*eZdZdZd<07>fdd<04> Zdd<06>Z<05>ZS)<08> ImageWindowz6Create an image window which displays the given image.rFcs8t|t<01>s t|<01>}||_|j\}}t<04>j|||d<01>dS)N)rHrJ)r+r!r"r$<00>superr)rr"rGrHrJ<00><01> __class__rrr<00>s

zImageWindow.__init__cCs|j<00>|||||f<04>dSr )r"r7rTrrrr]<00>szImageWindow.ui_handle_repair)rF)rrrrrr]<00> __classcell__rrrcrra<00>sraN) <09>
__future__rr&rrrr!rErarrrr<00><module>s