// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
- // Create a printer DC (obsolete function: use wxPrintData version now)
- wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = true, int orientation = wxPORTRAIT);
-
- wxPrinterDC(const wxPrintData& data);
-
- wxPrinterDC(WXHDC theDC);
+ wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
+ wxPrinterDCImpl( wxPrinterDC *owner, WXHDC theDC );
protected:
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = false);
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
protected:
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = false);
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
+ wxRasterOperationMode rop = wxCOPY, bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
+ virtual void DoGetSize(int *w, int *h) const
+ {
+ GetDeviceSize(w, h);
+ }
+
-WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& data);
+WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data);
+
+// ------------------------------------------------------------------------
+// wxPrinterDCromHDC
+//
+
+class WXDLLIMPEXP_CORE wxPrinterDCFromHDC: public wxPrinterDC
+{
+public:
+ wxPrinterDCFromHDC( WXHDC theDC )
+ : wxPrinterDC(new wxPrinterDCImpl(this, theDC))
+ {
+ }
+};