Table Of Contents

Previous topic

_OffsetHelper

Next topic

GraphicsBrush

This Page

phoenix_title GraphicsBitmap

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.


class_hierarchy Inheritance Diagram

Inheritance diagram for class GraphicsBitmap

Inheritance diagram of GraphicsBitmap


super_classes Known Superclasses

lib.graphics.GraphicsObject


method_summary Methods Summary

__init__ Create either a NULL GraphicsBitmap or an empty one if a size is given
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  

property_summary Properties Summary

Format  
Height  
Size  
Stride  
Surface  
Width  

api Class API



class 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.


Methods



__init__(self, width=-1, height=-1, format=FORMAT_ARGB32)

Create either a NULL GraphicsBitmap or an empty one if a size is given



static CreateFromBitmap(bitmap)

Create a GraphicsBitmap from a wx.Bitmap



static 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.



static CreateFromPNG(filename)

Create a GraphicsBitmap from a PNG file



static CreateFromSurface(surface)

Use an existing cairo ImageSurface as a GraphicsBitmap



IsNull(self)

Properties



Format

See fget



Height

See fget



Size

See fget



Stride

See fget



Surface

See fget



Width

See fget