X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0d7707bc4abc8f26f5ad0c4be8baa897658c330..9a2183c900361c33f39e2535e1841a2b8790e7a9:/include/wx/generic/dcpsg.h?ds=sidebyside diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 2d90c7fa64..b8847fa31f 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -16,6 +16,7 @@ #if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT #include "wx/dc.h" +#include "wx/dcprint.h" #include "wx/dialog.h" #include "wx/module.h" #include "wx/cmndata.h" @@ -25,15 +26,30 @@ // wxPostScriptDC //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPostScriptDC: public wxDC + +class WXDLLIMPEXP_CORE wxPostScriptDC : public wxDC { public: wxPostScriptDC(); // Recommended constructor wxPostScriptDC(const wxPrintData& printData); - - virtual ~wxPostScriptDC(); + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptDC) +}; + +class WXDLLIMPEXP_CORE wxPostScriptDCImpl : public wxDCImpl +{ +public: + wxPostScriptDCImpl( wxPrinterDC *owner ); + wxPostScriptDCImpl( wxPrinterDC *owner, const wxPrintData& data ); + wxPostScriptDCImpl( wxPostScriptDC *owner ); + wxPostScriptDCImpl( wxPostScriptDC *owner, const wxPrintData& data ); + + void Init(); + + virtual ~wxPostScriptDCImpl(); virtual bool Ok() const { return IsOk(); } virtual bool IsOk() const; @@ -61,18 +77,6 @@ public: // Resolution in pixels per logical inch wxSize GetPPI() const; -#if wxUSE_NEW_DC -#else - // these need to be overridden as wxPostscriptDC inherits - // from the platform dependent wxDC and this we'd call - // e.g. wxMSW specific code here. - virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); - virtual void SetMapMode(int mode); - virtual void SetUserScale(double x, double y); - virtual void SetLogicalScale(double x, double y); - virtual void SetLogicalOrigin(wxCoord x, wxCoord y); - virtual void SetDeviceOrigin(wxCoord x, wxCoord y); -#endif virtual void ComputeScaleAndOrigin(); void SetBackgroundMode(int WXUNUSED(mode)) { } @@ -83,12 +87,12 @@ public: virtual int GetDepth() const { return 24; } - static void SetResolution(int ppi); - static int GetResolution(); - void PsPrint( const wxString& psdata ); -private: + // Overrridden for wxPrinterDC Impl + + virtual int GetResolution(); + virtual wxRect GetPaperRect(); protected: bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE); @@ -106,7 +110,7 @@ protected: void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); #if wxUSE_SPLINES void DoDrawSpline(const wxPointList *points); -#endif // wxUSE_SPLINES +#endif 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); @@ -136,7 +140,7 @@ protected: double m_pageHeight; private: - DECLARE_DYNAMIC_CLASS(wxPostScriptDC) + DECLARE_DYNAMIC_CLASS(wxPostScriptDCImpl) }; #endif