#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"
// wxPostScriptDC
//-----------------------------------------------------------------------------
-class WXDLLEXPORT wxPostScriptDC: public wxDC
+
+class WXDLLEXPORT wxPostScriptDC : public wxDC
{
public:
wxPostScriptDC();
// Recommended constructor
wxPostScriptDC(const wxPrintData& printData);
-
- virtual ~wxPostScriptDC();
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPostScriptDC)
+};
+
+class WXDLLEXPORT 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;
// 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)) { }
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);
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);
double m_pageHeight;
private:
- DECLARE_DYNAMIC_CLASS(wxPostScriptDC)
+ DECLARE_DYNAMIC_CLASS(wxPostScriptDCImpl)
};
#endif