Table Of Contents

Previous topic

MouseGestures

Next topic

_OffsetHelper

This Page

phoenix_title graphics

This module implements an API similar to wx.GraphicsContext and the related classes. In this case 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.


class_hierarchy Inheritance Diagram

Inheritance diagram for module graphics

Inheritance diagram of graphics


function_summary Functions Summary

Property  

class_summary Classes Summary

_OffsetHelper  
GraphicsBitmap A GraphicsBitmap is a wrapper around a cairo ImageSurface. It can
GraphicsBrush A Brush is used to define how fills are painted. They can have
GraphicsContext The GraphicsContext is the object which facilitates drawing to a surface.
GraphicsFont  
GraphicsGradientStop This class represents a single color-stop in a gradient brush. The
GraphicsGradientStops An ordered collection of gradient color stops for a gradient brush. There
GraphicsMatrix A matrix holds an affine transformations, such as a scale,
GraphicsObject  
GraphicsPath A GraphicsPath is a representaion of a geometric path, essentially
GraphicsPen A Pen is used to define the properties of how a stroke is drawn.

Functions



Property(function)