Package wx :: Package lib :: Module graphics
[frames | no frames]


This module implements an API similar to wx.GraphicsContext and the related classes. The implementation for all platforms is done using Cairo, via the wx.lib.wxcairo glue module.

Why do this? Why not just use wx.GraphicsContext everywhere? Using Cairo on every platform enables us to more easily be totally consistent on all platforms. Implementing it in Python means that it is easy to fill in the gaps in functionality with features of Cairo that GraphicsContext may not provide, like converting text to a path, using compositing operators, or being able to provide an implementation for things like context.Clear().

Why not just use Cairo directly? There may be times when you do want to use wx.GrpahicsContext, so being able to share code between that and this implementation is nice. Also, I like the class hierarchy and API exposed by the wx.GraphicsContext classes a little better than Cairo's.

GraphicsBitmap A GraphicsBitmap is a wrapper around a cairo ImageSurface.
GraphicsBrush A Brush is used to define how fills are painted.
GraphicsContext The GraphicsContext is the object which facilitates drawing to a surface.
GraphicsMatrix A matrix holds an affine transformations, such as a scale, rotation, shear, or a combination of these, and is used to convert between different coordinante spaces.
GraphicsPath A GraphicsPath is a representaion of a geometric path, essentially a collection of lines and curves.
GraphicsPen A Pen is used to define the properties of how a stroke is drawn.

Function Summary

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:53:27 2009