403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/PIL/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/PIL/__pycache__/ImageWin.cpython-39.pyc
a

h�a�@sXddlmZGdd�d�ZGdd�d�ZGdd�d�ZGdd	�d	�ZGd
d�de�ZdS)
�)�Imagec@s eZdZdZdd�Zdd�ZdS)�HDCz�
    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��dc)�selfr�r�0/usr/lib/python3.9/site-packages/PIL/ImageWin.py�__init__szHDC.__init__cCs|jSrr�rrrr	�__int__!szHDC.__int__N��__name__�
__module__�__qualname__�__doc__r
rrrrr	rsrc@s eZdZdZdd�Zdd�ZdS)�HWNDz�
    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
||_dSr��wnd)rrrrr	r
,sz
HWND.__init__cCs|jSrrrrrr	r/szHWND.__int__Nr
rrrr	r%src@sNeZdZdZddd�Zdd�Zddd�Zd	d
�Zddd�Zd
d�Z	dd�Z
dS)�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�r"t|d�r"|j}|j}n|}d}|dvr<t�|�}tj�||�|_||_||_|rf|�|�dS)N�mode�size)�1�L�PZRGB)	�hasattrrrrZgetmodebase�coreZdisplay�image�paste)rrrrrrr	r
Gs
zDib.__init__c
CsXt|t�rH|j�|�}z|j�|�}W|j�||�qT|j�||�0n|j�|�}|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.
        )�
isinstancerr�getdc�expose�	releasedc)r�handler�resultrrr	r!Vs
"z
Dib.exposec
Csn|sd|j}t|t�rZ|j�|�}z"|j�|||�}W|j�||�qj|j�||�0n|j�|||�}|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.
        )�r%)rrrrr �drawr")rr#�dst�srcrr$rrr	r&hs


"zDib.drawc
CsXt|t�rH|j�|�}z|j�|�}W|j�||�qT|j�||�0n|j�|�}|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).
        )rrrr �
query_paletter")rr#r$rrr	r)~s
"zDib.query_palettecCsH|��|j|jkr |�|j�}|r6|j�|j|�n|j�|j�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)�loadrZconvertrr�im)rr+Zboxrrr	r�sz	Dib.pastecCs|j�|�S)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`)
        )r�	frombytes)r�bufferrrr	r,�sz
Dib.frombytescCs
|j��S)zy
        Copy display memory contents to bytes object.

        :return: A bytes object containing display data.
        )r�tobytesrrrr	r.�szDib.tobytes)N)N)N)rrrrr
r!r&r)rr,r.rrrr	r3s


	rc@sReZdZdZddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)�Windowz*Create a Window with the given title size.�PILNcCs"tj�||j|pd|pd�|_dS)Nr%)rrZcreatewindow�_Window__dispatcherZhwnd)r�title�width�heightrrr	r
�s�zWindow.__init__cGst|d|�|�S)NZ
ui_handle_)�getattr)r�action�argsrrr	Z__dispatcher�szWindow.__dispatchercCsdSrr�rr�x0�y0�x1�y1rrr	�ui_handle_clear�szWindow.ui_handle_clearcCsdSrr)rr9r:r;r<rrr	�ui_handle_damage�szWindow.ui_handle_damagecCsdSrrrrrr	�ui_handle_destroy�szWindow.ui_handle_destroycCsdSrrr8rrr	�ui_handle_repair�szWindow.ui_handle_repaircCsdSrr)rr3r4rrr	�ui_handle_resize�szWindow.ui_handle_resizecCstj��dSr)rrZ	eventlooprrrr	�mainloop�szWindow.mainloop)r0NN)rrrrr
r1r=r>r?r@rArBrrrr	r/�s
r/cs*eZdZdZd�fdd�	Zdd�Z�ZS)�ImageWindowz6Create an image window which displays the given image.r0cs8t|t�st|�}||_|j\}}t�j|||d�dS)N)r3r4)rrrr�superr
)rrr2r3r4��	__class__rr	r
�s


zImageWindow.__init__cCs|j�|||||f�dSr)rr&r8rrr	r@�szImageWindow.ui_handle_repair)r0)rrrrr
r@�
__classcell__rrrEr	rC�srCN)�rrrrr/rCrrrr	�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit