⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _gdi.py

📁 Wxpython Implemented on Windows CE, Source code
💻 PY
📖 第 1 页 / 共 5 页
字号:

    Creates a bitmap from an array of bits.  You should only use this
    function for monochrome bitmaps (depth 1) in portable programs: in
    this case the bits parameter should contain an XBM image.  For other
    bit depths, the behaviour is platform dependent.
    """
    val = _gdi_.new_BitmapFromBits(*args, **kwargs)
    return val

class Mask(_core.Object):
    """
    This class encapsulates a monochrome mask bitmap, where the masked
    area is black and the unmasked area is white. When associated with a
    bitmap and drawn in a device context, the unmasked area of the bitmap
    will be drawn, and the masked area will not be drawn.

    A mask may be associated with a `wx.Bitmap`. It is used in
    `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
    `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
    mask.
    """
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        """
        __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask

        Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
        that indicates the transparent portions of the mask.  In other words,
        the pixels in ``bitmap`` that match ``colour`` will be the transparent
        portions of the mask.  If no ``colour`` or an invalid ``colour`` is
        passed then BLACK is used.

        :see: `wx.Bitmap`, `wx.Colour`
        """
        _gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_Mask
    __del__ = lambda self : None;
_gdi_.Mask_swigregister(Mask)

MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.") 
class Icon(GDIObject):
    """Proxy of C++ Icon class"""
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
        _gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_Icon
    __del__ = lambda self : None;
    def LoadFile(*args, **kwargs):
        """LoadFile(self, String name, int type) -> bool"""
        return _gdi_.Icon_LoadFile(*args, **kwargs)

    def GetHandle(*args, **kwargs):
        """GetHandle(self) -> long"""
        return _gdi_.Icon_GetHandle(*args, **kwargs)

    def SetHandle(*args, **kwargs):
        """SetHandle(self, long handle)"""
        return _gdi_.Icon_SetHandle(*args, **kwargs)

    def Ok(*args, **kwargs):
        """Ok(self) -> bool"""
        return _gdi_.Icon_Ok(*args, **kwargs)

    def GetWidth(*args, **kwargs):
        """GetWidth(self) -> int"""
        return _gdi_.Icon_GetWidth(*args, **kwargs)

    def GetHeight(*args, **kwargs):
        """GetHeight(self) -> int"""
        return _gdi_.Icon_GetHeight(*args, **kwargs)

    def GetDepth(*args, **kwargs):
        """GetDepth(self) -> int"""
        return _gdi_.Icon_GetDepth(*args, **kwargs)

    def SetWidth(*args, **kwargs):
        """SetWidth(self, int w)"""
        return _gdi_.Icon_SetWidth(*args, **kwargs)

    def SetHeight(*args, **kwargs):
        """SetHeight(self, int h)"""
        return _gdi_.Icon_SetHeight(*args, **kwargs)

    def SetDepth(*args, **kwargs):
        """SetDepth(self, int d)"""
        return _gdi_.Icon_SetDepth(*args, **kwargs)

    def SetSize(*args, **kwargs):
        """SetSize(self, Size size)"""
        return _gdi_.Icon_SetSize(*args, **kwargs)

    def CopyFromBitmap(*args, **kwargs):
        """CopyFromBitmap(self, Bitmap bmp)"""
        return _gdi_.Icon_CopyFromBitmap(*args, **kwargs)

    def __nonzero__(self): return self.Ok() 
_gdi_.Icon_swigregister(Icon)

def EmptyIcon(*args, **kwargs):
    """EmptyIcon() -> Icon"""
    val = _gdi_.new_EmptyIcon(*args, **kwargs)
    return val

def IconFromLocation(*args, **kwargs):
    """IconFromLocation(IconLocation loc) -> Icon"""
    val = _gdi_.new_IconFromLocation(*args, **kwargs)
    return val

def IconFromBitmap(*args, **kwargs):
    """IconFromBitmap(Bitmap bmp) -> Icon"""
    val = _gdi_.new_IconFromBitmap(*args, **kwargs)
    return val

def IconFromXPMData(*args, **kwargs):
    """IconFromXPMData(PyObject listOfStrings) -> Icon"""
    val = _gdi_.new_IconFromXPMData(*args, **kwargs)
    return val

class IconLocation(object):
    """Proxy of C++ IconLocation class"""
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
        _gdi_.IconLocation_swiginit(self,_gdi_.new_IconLocation(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_IconLocation
    __del__ = lambda self : None;
    def IsOk(*args, **kwargs):
        """IsOk(self) -> bool"""
        return _gdi_.IconLocation_IsOk(*args, **kwargs)

    def __nonzero__(self): return self.Ok() 
    def SetFileName(*args, **kwargs):
        """SetFileName(self, String filename)"""
        return _gdi_.IconLocation_SetFileName(*args, **kwargs)

    def GetFileName(*args, **kwargs):
        """GetFileName(self) -> String"""
        return _gdi_.IconLocation_GetFileName(*args, **kwargs)

    def SetIndex(*args, **kwargs):
        """SetIndex(self, int num)"""
        return _gdi_.IconLocation_SetIndex(*args, **kwargs)

    def GetIndex(*args, **kwargs):
        """GetIndex(self) -> int"""
        return _gdi_.IconLocation_GetIndex(*args, **kwargs)

_gdi_.IconLocation_swigregister(IconLocation)

class IconBundle(object):
    """Proxy of C++ IconBundle class"""
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        """__init__(self) -> IconBundle"""
        _gdi_.IconBundle_swiginit(self,_gdi_.new_IconBundle(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_IconBundle
    __del__ = lambda self : None;
    def AddIcon(*args, **kwargs):
        """AddIcon(self, Icon icon)"""
        return _gdi_.IconBundle_AddIcon(*args, **kwargs)

    def AddIconFromFile(*args, **kwargs):
        """AddIconFromFile(self, String file, long type)"""
        return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs)

    def GetIcon(*args, **kwargs):
        """GetIcon(self, Size size) -> Icon"""
        return _gdi_.IconBundle_GetIcon(*args, **kwargs)

_gdi_.IconBundle_swigregister(IconBundle)

def IconBundleFromFile(*args, **kwargs):
    """IconBundleFromFile(String file, long type) -> IconBundle"""
    val = _gdi_.new_IconBundleFromFile(*args, **kwargs)
    return val

def IconBundleFromIcon(*args, **kwargs):
    """IconBundleFromIcon(Icon icon) -> IconBundle"""
    val = _gdi_.new_IconBundleFromIcon(*args, **kwargs)
    return val

class Cursor(GDIObject):
    """
    A cursor is a small bitmap usually used for denoting where the mouse
    pointer is, with a picture that might indicate the interpretation of a
    mouse click.

    A single cursor object may be used in many windows (any subwindow
    type). The wxWindows convention is to set the cursor for a window, as
    in X, rather than to set it globally as in MS Windows, although a
    global `wx.SetCursor` function is also available for use on MS Windows.

    """
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        """
        __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor

        Construct a Cursor from a file.  Specify the type of file using
        wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
        file.
        """
        _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_Cursor
    __del__ = lambda self : None;
    def GetHandle(*args, **kwargs):
        """
        GetHandle(self) -> long

        Get the MS Windows handle for the cursor
        """
        return _gdi_.Cursor_GetHandle(*args, **kwargs)

    def SetHandle(*args, **kwargs):
        """
        SetHandle(self, long handle)

        Set the MS Windows handle to use for the cursor
        """
        return _gdi_.Cursor_SetHandle(*args, **kwargs)

    def Ok(*args, **kwargs):
        """Ok(self) -> bool"""
        return _gdi_.Cursor_Ok(*args, **kwargs)

    def __nonzero__(self): return self.Ok() 
    def GetWidth(*args, **kwargs):
        """GetWidth(self) -> int"""
        return _gdi_.Cursor_GetWidth(*args, **kwargs)

    def GetHeight(*args, **kwargs):
        """GetHeight(self) -> int"""
        return _gdi_.Cursor_GetHeight(*args, **kwargs)

    def GetDepth(*args, **kwargs):
        """GetDepth(self) -> int"""
        return _gdi_.Cursor_GetDepth(*args, **kwargs)

    def SetWidth(*args, **kwargs):
        """SetWidth(self, int w)"""
        return _gdi_.Cursor_SetWidth(*args, **kwargs)

    def SetHeight(*args, **kwargs):
        """SetHeight(self, int h)"""
        return _gdi_.Cursor_SetHeight(*args, **kwargs)

    def SetDepth(*args, **kwargs):
        """SetDepth(self, int d)"""
        return _gdi_.Cursor_SetDepth(*args, **kwargs)

    def SetSize(*args, **kwargs):
        """SetSize(self, Size size)"""
        return _gdi_.Cursor_SetSize(*args, **kwargs)

_gdi_.Cursor_swigregister(Cursor)

def StockCursor(*args, **kwargs):
    """
    StockCursor(int id) -> Cursor

    Create a cursor using one of the stock cursors.  Note that not all
    stock cursors are available on all platforms.
    """
    val = _gdi_.new_StockCursor(*args, **kwargs)
    return val

def CursorFromImage(*args, **kwargs):
    """
    CursorFromImage(Image image) -> Cursor

    Constructs a cursor from a `wx.Image`. The mask (if any) will be used
    for setting the transparent portions of the cursor.
    """
    val = _gdi_.new_CursorFromImage(*args, **kwargs)
    return val

#---------------------------------------------------------------------------

OutRegion = _gdi_.OutRegion
PartRegion = _gdi_.PartRegion
InRegion = _gdi_.InRegion
class Region(GDIObject):
    """Proxy of C++ Region class"""
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
        _gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_Region
    __del__ = lambda self : None;
    def Clear(*args, **kwargs):
        """Clear(self)"""
        return _gdi_.Region_Clear(*args, **kwargs)

    def Offset(*args, **kwargs):
        """Offset(self, int x, int y) -> bool"""
        return _gdi_.Region_Offset(*args, **kwargs)

    def Contains(*args, **kwargs):
        """Contains(self, int x, int y) -> int"""
        return _gdi_.Region_Contains(*args, **kwargs)

    def ContainsPoint(*args, **kwargs):
        """ContainsPoint(self, Point pt) -> int"""
        return _gdi_.Region_ContainsPoint(*args, **kwargs)

    def ContainsRect(*args, **kwargs):
        """ContainsRect(self, Rect rect) -> int"""
        return _gdi_.Region_ContainsRect(*args, **kwargs)

    def ContainsRectDim(*args, **kwargs):
        """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
        return _gdi_.Region_ContainsRectDim(*args, **kwargs)

    def GetBox(*args, **kwargs):
        """GetBox(self) -> Rect"""
        return _gdi_.Region_GetBox(*args, **kwargs)

    def Intersect(*args, **kwargs):
        """Intersect(self, int x, int y, int width, int height) -> bool"""
        return _gdi_.Region_Intersect(*args, **kwargs)

    def IntersectRect(*args, **kwargs):
        """IntersectRect(self, Rect rect) -> bool"""
        return _gdi_.Region_IntersectRect(*args, **kwargs)

    def IntersectRegion(*args, **kwargs):
        """IntersectRegion(self, Region region) -> bool"""
        return _gdi_.Region_IntersectRegion(*args, **kwargs)

    def IsEmpty(*args, **kwargs):
        """IsEmpty(self) -> bool"""
        return _gdi_.Region_IsEmpty(*args, **kwargs)

    def Union(*args, **kwargs):
        """Union(self, int x, int y, int width, int height) -> bool"""
        return _gdi_.Region_Union(*args, **kwargs)

    def UnionRect(*args, **kwargs):
        """UnionRect(self, Rect rect) -> bool"""
        return _gdi_.Region_UnionRect(*args, **kwargs)

    def UnionRegion(*args, **kwargs):
        """UnionRegion(self, Region region) -> bool"""
        return _gdi_.Region_UnionRegion(*args, **kwargs)

    def Subtract(*args, **kwargs):
        """Subtract(self, int x, int y, int width, int height) -> bool"""
        return _gdi_.Region_Subtract(*args, **kwargs)

    def SubtractRect(*args, **kwargs):
        """SubtractRect(self, Rect rect) -> bool"""
        return _gdi_.Region_SubtractRect(*args, **kwargs)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -