Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/PIL/__pycache__/ImageWin.cpython-37.pyc

106 lines
7.8 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
(U<>]/<00>@s`ddlmZGdd<03>de<02>ZGdd<05>de<02>ZGdd<07>de<02>ZGdd <09>d e<02>ZGd
d <0B>d e<06>Zd S) <0A>)<01>Imagec@s eZdZdZdd<03>Zdd<05>ZdS)<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.
cCs
||_dS)N)<01>dc)<02>selfr<00>r<00>0/tmp/pip-install-pc7tm5jb/Pillow/PIL/ImageWin.py<70>__init__sz HDC.__init__cCs|jS)N)r)rrrr<00>__int__!sz HDC.__int__N)<06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rr rrrrrsrc@s eZdZdZdd<03>Zdd<05>ZdS)<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.
cCs
||_dS)N)<01>wnd)rrrrrr,sz HWND.__init__cCs|jS)N)r)rrrrr /sz HWND.__int__N)r
r r r rr rrrrr%src@sNeZdZdZddd<04>Zdd<06>Zddd<08>Zd d
<EFBFBD>Zdd d <0C>Zd d<0E>Z dd<10>Z
dS)<14>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 greylevels
are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
with 20 greylevels.
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.
NcCsjt|d<01>r"t|d<02>r"|j}|j}n|}d}|dkr<t<03>|<03>}tj<05>||<02>|_||_||_|rf|<00>|<01>dS)N<>mode<64>size)<04>1<>L<>PZRGB) <09>hasattrrrrZ getmodebase<73>coreZdisplay<61>image<67>paste)rrrrrrrrGs
z Dib.__init__c
CsJt|t<01>r:|j<02>|<01>}z|j<02>|<02>}Wd|j<02>||<02>Xn |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 the
:py:meth:`CDC.GetHandleAttrib` to get a suitable handle.
N)<06>
isinstancerr<00>getdc<64>expose<73> releasedc)r<00>handler<00>resultrrrrVs
  z
Dib.exposec
Cs`|sd|j}t|t<02>rL|j<03>|<01>}z|j<03>|||<03>}Wd|j<03>||<04>Xn|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.
)<02>r N)rrrrr<00>drawr)rr<00>dst<73>srcrrrrrr!hs


 zDib.drawc
CsJt|t<01>r:|j<02>|<01>}z|j<02>|<01>}Wd|j<02>||<01>Xn |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).
N)rrrr<00> query_paletter)rrrrrrr$~s
  zDib.query_palettecCsH|<01><00>|j|jkr |<01>|j<01>}|r6|j<03>|j|<02>n|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>convertrr<00>im)rr'Zboxrrrr<00>s   z Dib.pastecCs |j<00>|<01>S)z<>
Load display memory contents from byte data.
:param buffer: A buffer containing display data (usually
data returned from <b>tobytes</b>)
)r<00> frombytes)r<00>bufferrrrr(<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>tobytes)rrrrr*<00>sz Dib.tobytes)N)N)N) r
r r r rrr!r$rr(r*rrrrr3s


 rc@sReZdZdZddd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Zdd<0F>Z dd<11>Z
dd<13>Z dS)<15>Windowz*Create a Window with the given title size.<2E>PILNcCs"tj<01>||j|pd|pd<01>|_dS)Nr )rrZ createwindow<6F>_Window__dispatcherZhwnd)r<00>title<6C>width<74>heightrrrr<00>szWindow.__init__cGst|d|<00>|<02>S)NZ
ui_handle_)<01>getattr)r<00>action<6F>argsrrrZ __dispatcher<65>szWindow.__dispatchercCsdS)Nr)rr<00>x0<78>y0<79>x1<78>y1rrr<00>ui_handle_clear<61>szWindow.ui_handle_clearcCsdS)Nr)rr4r5r6r7rrr<00>ui_handle_damage<67>szWindow.ui_handle_damagecCsdS)Nr)rrrr<00>ui_handle_destroy<6F>szWindow.ui_handle_destroycCsdS)Nr)rrr4r5r6r7rrr<00>ui_handle_repair<69>szWindow.ui_handle_repaircCsdS)Nr)rr/r0rrr<00>ui_handle_resize<7A>szWindow.ui_handle_resizecCstj<01><02>dS)N)rrZ eventloop)rrrr<00>mainloop<6F>szWindow.mainloop)r,NN) r
r r r rr-r8r9r:r;r<r=rrrrr+<00>s
r+c@s"eZdZdZddd<04>Zdd<06>ZdS) <09> ImageWindowz6Create an image window which displays the given image.r,cCs8t|t<01>st|<01>}||_|j\}}tj||||d<01>dS)N)r/r0)rrrrr+r)rrr.r/r0rrrr<00>s


zImageWindow.__init__cCs|j<00>|||||f<04>dS)N)rr!)rrr4r5r6r7rrrr;<00>szImageWindow.ui_handle_repairN)r,)r
r r r rr;rrrrr><00>s
r>N)<08>r<00>objectrrrr+r>rrrr<00><module>s