[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] EPS export

Gerry Iles wrote:
Errr, what is full of virtuals?  I presume you mean wxDC.

pure virtuals, yes, wxDC.

> Well, under
MFC, CDC is the class that simply wraps a Win32 HDC so there are no
virtuals involved.  Unfortunately, in wxWidgets, there is a class
hierarchy of DCs (similar to our CCDC hierarchy) but to link the two
hierarchies together is not really possible.  This is why CCPaintDC was
changed to derive from wxPaintDC rather than CCDC (as it requires the
functionality in wxPaintDC).


> You may have to make similar changes for
the printing and/or export DCs if this is compatible with how the DCs
get created during printing or export (e.g. derive ExportDC from one of
the derived wxDC classes if it is possible for the app to create its own
DC for the print job).  However, I suspect that wx will actually create
the relevant type of DC and the just has to use it so it might be
necessary to reorganise things a bit (e.g. make CCDC contain a wxDC*
rather than be derived from it).  I think this will be a large amount of

The plugin filter stuff doesn't export in the same way.  The "rendering"
that it does is either simple rendering into bitmaps or uses a
specialised render region that does not output anything to a "device"
and hence does not need a DC (of any sort) to render into.

OK I think I can assume that as CCDC has pure virtuals too, no instance
of it is ever currently created then!

I'm trying to work out which bits of wxDC CCDC (and thus EPSExportDC
etc.) actually need. If the only thing CDC did was wrap an m_hDC
I'm guessing the answer is "none". Or is CDC more complex than that?