X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb7637b58750721cc1cbd7b126c3d9323a974b75..e06b0afba5b1acf36241d33982d5d88cccefa2e8:/include/wx/generic/dcpsg.h?ds=sidebyside diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index cf9041546a..4e84bfeffe 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,46 @@ // wxPostScriptDC //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPostScriptDC: public wxDC + +#if wxUSE_NEW_DC + +class WXDLLEXPORT wxPostScriptDC : public wxDC +{ +public: + wxPostScriptDC(); + + // Recommended constructor + wxPostScriptDC(const wxPrintData& printData); + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptDC) +}; + +#endif + +#if wxUSE_NEW_DC +class WXDLLEXPORT wxPostScriptImplDC : public wxImplDC +#else +#define wxPostScriptImplDC wxPostScriptDC +class WXDLLEXPORT wxPostScriptDC : public wxDC +#endif { public: +#if wxUSE_NEW_DC + wxPostScriptImplDC( wxPrinterDC *owner ); + wxPostScriptImplDC( wxPrinterDC *owner, const wxPrintData& data ); + wxPostScriptImplDC( wxPostScriptDC *owner ); + wxPostScriptImplDC( wxPostScriptDC *owner, const wxPrintData& data ); +#else wxPostScriptDC(); // Recommended constructor wxPostScriptDC(const wxPrintData& printData); +#endif - virtual ~wxPostScriptDC(); + void Init(); + + virtual ~wxPostScriptImplDC(); virtual bool Ok() const { return IsOk(); } virtual bool IsOk() const; @@ -73,6 +105,7 @@ public: virtual void SetLogicalOrigin(wxCoord x, wxCoord y); virtual void SetDeviceOrigin(wxCoord x, wxCoord y); #endif + virtual void ComputeScaleAndOrigin(); void SetBackgroundMode(int WXUNUSED(mode)) { } void SetPalette(const wxPalette& WXUNUSED(palette)) { } @@ -82,12 +115,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); @@ -104,8 +137,8 @@ protected: void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20); void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); #if wxUSE_SPLINES - void DoDrawSpline(wxList *points); -#endif // wxUSE_SPLINES + void DoDrawSpline(const wxPointList *points); +#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); @@ -135,7 +168,7 @@ protected: double m_pageHeight; private: - DECLARE_DYNAMIC_CLASS(wxPostScriptDC) + DECLARE_DYNAMIC_CLASS(wxPostScriptImplDC) }; #endif