//-----------------------------------------------------------------------------
// wxPostScriptDC
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// wxPostScriptDC
//-----------------------------------------------------------------------------
- virtual bool Ok() const { return IsOk(); }
- virtual bool IsOk() const;
+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 Clear();
- void SetFont( const wxFont& font );
- void SetPen( const wxPen& pen );
- void SetBrush( const wxBrush& brush );
- void SetLogicalFunction( int function );
- void SetBackground( const wxBrush& brush );
+ virtual ~wxPostScriptDCImpl();
- wxCoord GetCharHeight() const;
- wxCoord GetCharWidth() const;
- bool CanGetTextExtent() const { return true; }
+ void Clear();
+ void SetFont( const wxFont& font );
+ void SetPen( const wxPen& pen );
+ void SetBrush( const wxBrush& brush );
+ void SetLogicalFunction( int function );
+ void SetBackground( const wxBrush& brush );
- void SetBackgroundMode(int WXUNUSED(mode)) { }
- void SetPalette(const wxPalette& WXUNUSED(palette)) { }
+ wxCoord GetCharHeight() const;
+ wxCoord GetCharWidth() const;
+ bool CanGetTextExtent() const { return true; }
- WX_DEFINE_VARARG_FUNC_VOID(PsPrintf, DoPsPrintfFormat)
- void PsPrint( const wxString& psdata );
- void PsPrint( int ch );
+ void SetPrintData(const wxPrintData& data);
+ wxPrintData& GetPrintData() { return m_printData; }
-private:
- void DoPsPrintfFormat(const wxChar *fmt, ... );
+ virtual int GetDepth() const { return 24; }
+
+ void PsPrint( const wxString& psdata );
+
+ // Overrridden for wxPrinterDC Impl
protected:
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE);
protected:
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE);
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 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
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);
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);
void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
FILE* m_pstream; // PostScript output stream
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
FILE* m_pstream; // PostScript output stream
unsigned char m_currentRed;
unsigned char m_currentGreen;
unsigned char m_currentBlue;
unsigned char m_currentRed;
unsigned char m_currentGreen;
unsigned char m_currentBlue;