Table Of Contents

Previous topic

pdfButtonPanel

Next topic

dcGraphicsContext

This Page

phoenix_title dcgraphics

This module implements an API similar to wx.GraphicsContext and the related classes. The implementation is done using wx.DC

Why do this? Neither wx.GraphicsContext not the Cairo-based GraphicsContext API provided by wx.lib.graphics can be written directly to a PrintDC. It can be done via an intermediate bitmap in a MemoryDC but transferring this to a PrintDC is an order of magnitude slower than writing directly.

Why not just use wxPrintDC directly? There may be times when you do want to use wx.GraphicsContext for its displayed appearance and for its clean(er) API, so being able to use the same code for printing as well is nice.

It started out with the intention of being a full implementation of the GraphicsContext API but so far only contains the sub-set required to render PDF. It also contains the co-ordinate twiddles for the PDF origin, which would need to be separated out if this was ever developed to be more general purpose.


class_hierarchy Inheritance Diagram

Inheritance diagram for module dcgraphics

Inheritance diagram of dcgraphics


class_summary Classes Summary

dcGraphicsContext  
dcGraphicsMatrix A matrix holds an affine transformations, such as a scale,
dcGraphicsPath A GraphicsPath is a representaion of a geometric path, essentially
dcGraphicsState Each instance holds the current graphics state. It can be