A GraphicsBitmap is a wrapper around a cairo ImageSurface. It can be used as a source for drawing images, or as a target of drawing operations.
__init__ |
Create either a NULL GraphicsBitmap or an empty one if a size is given |
ConvertToImage |
Return the contents of this GraphicsBitmap as a wx.Image . |
CreateFromBitmap |
Create a GraphicsBitmap from a wx.Bitmap |
CreateFromBuffer |
Creates a GraphicsBitmap that uses the given buffer object as |
CreateFromPNG |
Create a GraphicsBitmap from a PNG file |
CreateFromSurface |
Use an existing cairo ImageSurface as a GraphicsBitmap |
IsNull |
Format |
The type or format of the Cairo Surface . |
Height |
The height of the bitmap and surface |
Size |
A tuple consisting of the Width and Height |
Stride |
The “stride” of the Cairo Surface , in bytes. |
Surface |
A reference to the Cairo Surface used for this bitmap. |
Width |
The width of the bitmap and surface |
GraphicsBitmap
(GraphicsObject)¶A GraphicsBitmap is a wrapper around a cairo ImageSurface. It can be used as a source for drawing images, or as a target of drawing operations.
__init__
(self, width=-1, height=-1, format=FORMAT_ARGB32)¶Create either a NULL GraphicsBitmap or an empty one if a size is given
ConvertToImage
(self)¶Return the contents of this GraphicsBitmap
as a wx.Image
.
Currently not implemented...
CreateFromBitmap
(bitmap)¶Create a GraphicsBitmap from a wx.Bitmap
CreateFromBuffer
(buffer, width, height, format=FORMAT_ARGB32, stride=-1)¶Creates a GraphicsBitmap that uses the given buffer object as the pixel storage. This means that the current contents of the buffer will be the initial state of the bitmap, and anything drawn to this surface will be stored in the given buffer.
CreateFromPNG
(filename)¶Create a GraphicsBitmap from a PNG file
CreateFromSurface
(surface)¶Use an existing cairo ImageSurface as a GraphicsBitmap
IsNull
(self)¶Format
¶The type or format of the Cairo Surface
.
Typically FORMAT_ARGB32
or FORMAT_RGB24
Height
¶The height of the bitmap and surface
Size
¶A tuple consisting of the Width and Height
Stride
¶The “stride” of the Cairo Surface
, in bytes.
The stride is the distance in bytes from the beginning of one row
of the image data to the beginning of the next row.
Surface
¶A reference to the Cairo Surface
used for this bitmap.
Width
¶The width of the bitmap and surface