.. include:: headings.inc .. module:: lib.pdfviewer.dcgraphics .. currentmodule:: lib.pdfviewer.dcgraphics .. highlight:: python .. _lib.pdfviewer.dcgraphics: ========================================================================================================================================== |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** .. raw:: html

Inheritance diagram of dcgraphics

| |class_summary| Classes Summary =============================== ================================================================================ ================================================================================ :ref:`lib.pdfviewer.dcgraphics.dcGraphicsContext` :ref:`lib.pdfviewer.dcgraphics.dcGraphicsMatrix` A matrix holds an affine transformations, such as a scale, :ref:`lib.pdfviewer.dcgraphics.dcGraphicsPath` A GraphicsPath is a representaion of a geometric path, essentially :ref:`lib.pdfviewer.dcgraphics.dcGraphicsState` Each instance holds the current graphics state. It can be ================================================================================ ================================================================================ | .. toctree:: :maxdepth: 1 :hidden: lib.pdfviewer.dcgraphics.dcGraphicsContext lib.pdfviewer.dcgraphics.dcGraphicsMatrix lib.pdfviewer.dcgraphics.dcGraphicsPath lib.pdfviewer.dcgraphics.dcGraphicsState