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

📄 _gdi.py

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

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

    def __eq__(*args, **kwargs):
        """__eq__(self, Pen other) -> bool"""
        return _gdi_.Pen___eq__(*args, **kwargs)

    def __ne__(*args, **kwargs):
        """__ne__(self, Pen other) -> bool"""
        return _gdi_.Pen___ne__(*args, **kwargs)

    def __nonzero__(self): return self.Ok() 
_gdi_.Pen_swigregister(Pen)

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

class Brush(GDIObject):
    """
    A brush is a drawing tool for filling in areas. It is used for
    painting the background of rectangles, ellipses, etc. when drawing on
    a `wx.DC`.  It has a colour and a style.
    """
    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, Colour colour, int style=SOLID) -> Brush

        Constructs a brush from a `wx.Colour` object and a style.
        """
        _gdi_.Brush_swiginit(self,_gdi_.new_Brush(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_Brush
    __del__ = lambda self : None;
    def SetColour(*args, **kwargs):
        """
        SetColour(self, Colour col)

        Set the brush's `wx.Colour`.
        """
        return _gdi_.Brush_SetColour(*args, **kwargs)

    def SetStyle(*args, **kwargs):
        """
        SetStyle(self, int style)

        Sets the style of the brush. See `__init__` for a listing of styles.
        """
        return _gdi_.Brush_SetStyle(*args, **kwargs)

    def SetStipple(*args, **kwargs):
        """
        SetStipple(self, Bitmap stipple)

        Sets the stipple `wx.Bitmap`.
        """
        return _gdi_.Brush_SetStipple(*args, **kwargs)

    def GetColour(*args, **kwargs):
        """
        GetColour(self) -> Colour

        Returns the `wx.Colour` of the brush.
        """
        return _gdi_.Brush_GetColour(*args, **kwargs)

    def GetStyle(*args, **kwargs):
        """
        GetStyle(self) -> int

        Returns the style of the brush.  See `__init__` for a listing of
        styles.
        """
        return _gdi_.Brush_GetStyle(*args, **kwargs)

    def GetStipple(*args, **kwargs):
        """
        GetStipple(self) -> Bitmap

        Returns the stiple `wx.Bitmap` of the brush.  If the brush does not
        have a wx.STIPPLE style, then the return value may be non-None but an
        uninitialised bitmap (`wx.Bitmap.Ok` returns False).
        """
        return _gdi_.Brush_GetStipple(*args, **kwargs)

    def IsHatch(*args, **kwargs):
        """
        IsHatch(self) -> bool

        Is the current style a hatch type?
        """
        return _gdi_.Brush_IsHatch(*args, **kwargs)

    def Ok(*args, **kwargs):
        """
        Ok(self) -> bool

        Returns True if the brush is initialised and valid.
        """
        return _gdi_.Brush_Ok(*args, **kwargs)

    def __nonzero__(self): return self.Ok() 
_gdi_.Brush_swigregister(Brush)

def BrushFromBitmap(*args, **kwargs):
    """
    BrushFromBitmap(Bitmap stippleBitmap) -> Brush

    Constructs a stippled brush using a bitmap.
    """
    val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
    return val

class Bitmap(GDIObject):
    """
    The wx.Bitmap class encapsulates the concept of a platform-dependent
    bitmap.  It can be either monochrome or colour, and either loaded from
    a file or created dynamically.  A bitmap can be selected into a memory
    device context (instance of `wx.MemoryDC`). This enables the bitmap to
    be copied to a window or memory device context using `wx.DC.Blit`, or
    to be used as a drawing surface.
    """
    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=BITMAP_TYPE_ANY) -> Bitmap

        Loads a bitmap from a file.
        """
        _gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
    __swig_destroy__ = _gdi_.delete_Bitmap
    __del__ = lambda self : None;
    def Ok(*args, **kwargs):
        """Ok(self) -> bool"""
        return _gdi_.Bitmap_Ok(*args, **kwargs)

    def GetWidth(*args, **kwargs):
        """
        GetWidth(self) -> int

        Gets the width of the bitmap in pixels.
        """
        return _gdi_.Bitmap_GetWidth(*args, **kwargs)

    def GetHeight(*args, **kwargs):
        """
        GetHeight(self) -> int

        Gets the height of the bitmap in pixels.
        """
        return _gdi_.Bitmap_GetHeight(*args, **kwargs)

    def GetDepth(*args, **kwargs):
        """
        GetDepth(self) -> int

        Gets the colour depth of the bitmap. A value of 1 indicates a
        monochrome bitmap.
        """
        return _gdi_.Bitmap_GetDepth(*args, **kwargs)

    def GetSize(*args, **kwargs):
        """
        GetSize(self) -> Size

        Get the size of the bitmap.
        """
        return _gdi_.Bitmap_GetSize(*args, **kwargs)

    def ConvertToImage(*args, **kwargs):
        """
        ConvertToImage(self) -> Image

        Creates a platform-independent image from a platform-dependent
        bitmap. This preserves mask information so that bitmaps and images can
        be converted back and forth without loss in that respect.
        """
        return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)

    def GetMask(*args, **kwargs):
        """
        GetMask(self) -> Mask

        Gets the associated mask (if any) which may have been loaded from a
        file or explpicitly set for the bitmap.

        :see: `SetMask`, `wx.Mask`

        """
        return _gdi_.Bitmap_GetMask(*args, **kwargs)

    def SetMask(*args, **kwargs):
        """
        SetMask(self, Mask mask)

        Sets the mask for this bitmap.

        :see: `GetMask`, `wx.Mask`

        """
        return _gdi_.Bitmap_SetMask(*args, **kwargs)

    def SetMaskColour(*args, **kwargs):
        """
        SetMaskColour(self, Colour colour)

        Create a Mask based on a specified colour in the Bitmap.
        """
        return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)

    def GetSubBitmap(*args, **kwargs):
        """
        GetSubBitmap(self, Rect rect) -> Bitmap

        Returns a sub-bitmap of the current one as long as the rect belongs
        entirely to the bitmap. This function preserves bit depth and mask
        information.
        """
        return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)

    def SaveFile(*args, **kwargs):
        """
        SaveFile(self, String name, int type, Palette palette=None) -> bool

        Saves a bitmap in the named file.  See `__init__` for a description of
        the ``type`` parameter.
        """
        return _gdi_.Bitmap_SaveFile(*args, **kwargs)

    def LoadFile(*args, **kwargs):
        """
        LoadFile(self, String name, int type) -> bool

        Loads a bitmap from a file.  See `__init__` for a description of the
        ``type`` parameter.
        """
        return _gdi_.Bitmap_LoadFile(*args, **kwargs)

    def GetPalette(*args, **kwargs):
        """GetPalette(self) -> Palette"""
        return _gdi_.Bitmap_GetPalette(*args, **kwargs)

    def CopyFromIcon(*args, **kwargs):
        """CopyFromIcon(self, Icon icon) -> bool"""
        return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)

    def SetHeight(*args, **kwargs):
        """
        SetHeight(self, int height)

        Set the height property (does not affect the existing bitmap data).
        """
        return _gdi_.Bitmap_SetHeight(*args, **kwargs)

    def SetWidth(*args, **kwargs):
        """
        SetWidth(self, int width)

        Set the width property (does not affect the existing bitmap data).
        """
        return _gdi_.Bitmap_SetWidth(*args, **kwargs)

    def SetDepth(*args, **kwargs):
        """
        SetDepth(self, int depth)

        Set the depth property (does not affect the existing bitmap data).
        """
        return _gdi_.Bitmap_SetDepth(*args, **kwargs)

    def SetSize(*args, **kwargs):
        """
        SetSize(self, Size size)

        Set the bitmap size (does not affect the existing bitmap data).
        """
        return _gdi_.Bitmap_SetSize(*args, **kwargs)

    def __nonzero__(self): return self.Ok() 
    def __eq__(*args, **kwargs):
        """__eq__(self, Bitmap other) -> bool"""
        return _gdi_.Bitmap___eq__(*args, **kwargs)

    def __ne__(*args, **kwargs):
        """__ne__(self, Bitmap other) -> bool"""
        return _gdi_.Bitmap___ne__(*args, **kwargs)

_gdi_.Bitmap_swigregister(Bitmap)

def EmptyBitmap(*args, **kwargs):
    """
    EmptyBitmap(int width, int height, int depth=-1) -> Bitmap

    Creates a new bitmap of the given size.  A depth of -1 indicates the
    depth of the current screen or visual. Some platforms only support 1
    for monochrome and -1 for the current display depth.
    """
    val = _gdi_.new_EmptyBitmap(*args, **kwargs)
    return val

def BitmapFromIcon(*args, **kwargs):
    """
    BitmapFromIcon(Icon icon) -> Bitmap

    Create a new bitmap from a `wx.Icon` object.
    """
    val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
    return val

def BitmapFromImage(*args, **kwargs):
    """
    BitmapFromImage(Image image, int depth=-1) -> Bitmap

    Creates bitmap object from a `wx.Image`. This has to be done to
    actually display a `wx.Image` as you cannot draw an image directly on
    a window. The resulting bitmap will use the provided colour depth (or
    that of the current screen colour depth if depth is -1) which entails
    that a colour reduction may have to take place.
    """
    val = _gdi_.new_BitmapFromImage(*args, **kwargs)
    return val

def BitmapFromXPMData(*args, **kwargs):
    """
    BitmapFromXPMData(PyObject listOfStrings) -> Bitmap

    Construct a Bitmap from a list of strings formatted as XPM data.
    """
    val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
    return val

def BitmapFromBits(*args, **kwargs):
    """
    BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap

    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): 

⌨️ 快捷键说明

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