Make ComputeScaleAndOrigin() as virtual part of wxDCBase and this way present on missing platforms. Add into manaul too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-12-16 21:24:45 +00:00
parent 4bfa318965
commit b1263dcfa3
16 changed files with 100 additions and 92 deletions

View File

@@ -57,13 +57,13 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
bool DoGetPixel(wxCoord, wxCoord, class wxColour *) const bool DoGetPixel(wxCoord, wxCoord, class wxColour *) const
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::DoGetPixel Call not implemented")); return true; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoGetPixel Call not implemented")); return true; };
virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, class wxDC *, virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, class wxDC *,
wxCoord, wxCoord, int = wxCOPY, bool = 0, int = -1, int = -1) ; wxCoord, wxCoord, int = wxCOPY, bool = 0, int = -1, int = -1) ;
void DoCrossHair(wxCoord, wxCoord) void DoCrossHair(wxCoord, wxCoord)
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::CrossHair Call not implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::CrossHair Call not implemented")); return ; };
void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord); void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord);
@@ -93,14 +93,14 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour& WXUNUSED(col), bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour& WXUNUSED(col),
int WXUNUSED(style) = wxFLOOD_SURFACE) int WXUNUSED(style) = wxFLOOD_SURFACE)
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::DoFloodFill Call not implemented")); return FALSE ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoFloodFill Call not implemented")); return false ; };
void DoGetSize(int * x, int *y) const { *x = m_width; *y = m_height ; return ; } ; void DoGetSize(int * x, int *y) const { *x = m_width; *y = m_height ; return ; } ;
void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, wxFont *font = NULL) const ; void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, wxFont *font = NULL) const ;
void DoSetClippingRegionAsRegion(const class wxRegion &) void DoSetClippingRegionAsRegion(const class wxRegion &)
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented")); return ; };
void Init (wxString f, int Width, int Height, float dpi); void Init (wxString f, int Width, int Height, float dpi);
@@ -206,23 +206,23 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
bool CanGetTextExtent() const { return true; }; bool CanGetTextExtent() const { return true; };
int GetDepth() const int GetDepth() const
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::GetDepth Call not implemented")); return -1 ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::GetDepth Call not implemented")); return -1 ; };
void BeginDrawing() { return;}; void BeginDrawing() { return;};
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, int logicalFunc = wxCOPY, bool useMask = FALSE) bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, int logicalFunc = wxCOPY, bool useMask = false)
{ return DoBlit(xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc, useMask); }; { return DoBlit(xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc, useMask); };
void Clear() void Clear()
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?")); return ; };
void CrossHair(wxCoord x, wxCoord y) void CrossHair(wxCoord x, wxCoord y)
{ DoCrossHair (x,y); return; }; { DoCrossHair (x,y); return; };
void ComputeScaleAndOrigin() ; virtual void ComputeScaleAndOrigin();
void DestroyClippingRegion() void DestroyClippingRegion()
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::void Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::void Call not yet implemented")); return ; };
wxCoord DeviceToLogicalX(wxCoord x) const ; wxCoord DeviceToLogicalX(wxCoord x) const ;
@@ -257,10 +257,10 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
wxCoord GetCharWidth() const; wxCoord GetCharWidth() const;
void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y), wxCoord * WXUNUSED(width), wxCoord * WXUNUSED(height)) void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y), wxCoord * WXUNUSED(width), wxCoord * WXUNUSED(height))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::GetClippingBox Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::GetClippingBox Call not yet implemented")); return ; };
int GetLogicalFunction() int GetLogicalFunction()
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::GetLogicalFunction() Call not implemented")); return wxCOPY ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::GetLogicalFunction() Call not implemented")); return wxCOPY ; };
int GetMapMode() ; int GetMapMode() ;
@@ -282,10 +282,10 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
void SetAxisOrientation( bool xLeftRight, bool yBottomUp ) ; void SetAxisOrientation( bool xLeftRight, bool yBottomUp ) ;
void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxCoord WXUNUSED(width), wxCoord WXUNUSED(height)) void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxCoord WXUNUSED(width), wxCoord WXUNUSED(height))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::SetClippingRegion Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetClippingRegion Call not yet implemented")); return ; };
void SetPalette(const wxPalette& WXUNUSED(palette)) void SetPalette(const wxPalette& WXUNUSED(palette))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::SetPalette Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetPalette Call not yet implemented")); return ; };
void SetBackground( const wxBrush &brush ) ; void SetBackground( const wxBrush &brush ) ;
@@ -296,7 +296,7 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
void SetFont(const wxFont& font) ; void SetFont(const wxFont& font) ;
void SetLogicalFunction(int WXUNUSED(function)) void SetLogicalFunction(int WXUNUSED(function))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::SetLogicalFunction Call implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetLogicalFunction Call implemented")); return ; };
void SetLogicalScale( double x, double y ) ; void SetLogicalScale( double x, double y ) ;
@@ -311,7 +311,7 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
void SetUserScale(double xScale, double yScale) ; void SetUserScale(double xScale, double yScale) ;
bool StartDoc(const wxString& WXUNUSED(message)) bool StartDoc(const wxString& WXUNUSED(message))
{ return FALSE; }; { return false; };
void StartPage() void StartPage()
{ return ; }; { return ; };

View File

@@ -193,6 +193,15 @@ wxUSE\_DC\_CACHEING preprocessor symbol for portability.
\end{comment} \end{comment}
\membersection{wxDC::ComputeScaleAndOrigin}\label{wxdccomputescaleandorigin}
\func{virtual void}{ComputeScaleAndOrigin}{\void}
Performs all necessary computations for given platform and context type
after each change of scale and origin parameters. Usually called automatically
internally after such changes.
\membersection{wxDC::CrossHair}\label{wxdccrosshair} \membersection{wxDC::CrossHair}\label{wxdccrosshair}
\func{void}{CrossHair}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} \func{void}{CrossHair}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}

View File

@@ -69,7 +69,7 @@ public:
virtual void Clear(); virtual void Clear();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc(void) {}; virtual void EndDoc(void) {};
virtual void StartPage(void) {}; virtual void StartPage(void) {};
@@ -109,7 +109,7 @@ public:
virtual void SetTextForeground(const wxColour& colour) ; virtual void SetTextForeground(const wxColour& colour) ;
virtual void SetTextBackground(const wxColour& colour) ; virtual void SetTextBackground(const wxColour& colour) ;
void ComputeScaleAndOrigin(void); virtual void ComputeScaleAndOrigin();
protected: protected:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE); int style = wxFLOOD_SURFACE);
@@ -136,7 +136,7 @@ protected:
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE); bool useMask = false);
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
@@ -144,7 +144,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
// this is gnarly - we can't even call this function DoSetClippingRegion() // this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding // because of virtual function hiding

View File

@@ -530,6 +530,8 @@ public:
{ wxCoord x, y; DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); } { wxCoord x, y; DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); }
virtual void SetDeviceOrigin(wxCoord x, wxCoord y) = 0; virtual void SetDeviceOrigin(wxCoord x, wxCoord y) = 0;
virtual void ComputeScaleAndOrigin() {}
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) = 0; virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) = 0;
int GetLogicalFunction() const { return m_logicalFunction; } int GetLogicalFunction() const { return m_logicalFunction; }

View File

@@ -57,13 +57,13 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
bool DoGetPixel(wxCoord, wxCoord, class wxColour *) const bool DoGetPixel(wxCoord, wxCoord, class wxColour *) const
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::DoGetPixel Call not implemented")); return true; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoGetPixel Call not implemented")); return true; };
virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, class wxDC *, virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, class wxDC *,
wxCoord, wxCoord, int = wxCOPY, bool = 0, int = -1, int = -1) ; wxCoord, wxCoord, int = wxCOPY, bool = 0, int = -1, int = -1) ;
void DoCrossHair(wxCoord, wxCoord) void DoCrossHair(wxCoord, wxCoord)
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::CrossHair Call not implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::CrossHair Call not implemented")); return ; };
void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord); void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord);
@@ -93,14 +93,14 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour& WXUNUSED(col), bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour& WXUNUSED(col),
int WXUNUSED(style) = wxFLOOD_SURFACE) int WXUNUSED(style) = wxFLOOD_SURFACE)
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::DoFloodFill Call not implemented")); return FALSE ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoFloodFill Call not implemented")); return false ; };
void DoGetSize(int * x, int *y) const { *x = m_width; *y = m_height ; return ; } ; void DoGetSize(int * x, int *y) const { *x = m_width; *y = m_height ; return ; } ;
void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, wxFont *font = NULL) const ; void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, wxFont *font = NULL) const ;
void DoSetClippingRegionAsRegion(const class wxRegion &) void DoSetClippingRegionAsRegion(const class wxRegion &)
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented")); return ; };
void Init (wxString f, int Width, int Height, float dpi); void Init (wxString f, int Width, int Height, float dpi);
@@ -206,23 +206,23 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
bool CanGetTextExtent() const { return true; }; bool CanGetTextExtent() const { return true; };
int GetDepth() const int GetDepth() const
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::GetDepth Call not implemented")); return -1 ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::GetDepth Call not implemented")); return -1 ; };
void BeginDrawing() { return;}; void BeginDrawing() { return;};
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, int logicalFunc = wxCOPY, bool useMask = FALSE) bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, int logicalFunc = wxCOPY, bool useMask = false)
{ return DoBlit(xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc, useMask); }; { return DoBlit(xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc, useMask); };
void Clear() void Clear()
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?")); return ; };
void CrossHair(wxCoord x, wxCoord y) void CrossHair(wxCoord x, wxCoord y)
{ DoCrossHair (x,y); return; }; { DoCrossHair (x,y); return; };
void ComputeScaleAndOrigin() ; virtual void ComputeScaleAndOrigin();
void DestroyClippingRegion() void DestroyClippingRegion()
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::void Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::void Call not yet implemented")); return ; };
wxCoord DeviceToLogicalX(wxCoord x) const ; wxCoord DeviceToLogicalX(wxCoord x) const ;
@@ -257,10 +257,10 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
wxCoord GetCharWidth() const; wxCoord GetCharWidth() const;
void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y), wxCoord * WXUNUSED(width), wxCoord * WXUNUSED(height)) void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y), wxCoord * WXUNUSED(width), wxCoord * WXUNUSED(height))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::GetClippingBox Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::GetClippingBox Call not yet implemented")); return ; };
int GetLogicalFunction() int GetLogicalFunction()
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::GetLogicalFunction() Call not implemented")); return wxCOPY ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::GetLogicalFunction() Call not implemented")); return wxCOPY ; };
int GetMapMode() ; int GetMapMode() ;
@@ -282,10 +282,10 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
void SetAxisOrientation( bool xLeftRight, bool yBottomUp ) ; void SetAxisOrientation( bool xLeftRight, bool yBottomUp ) ;
void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxCoord WXUNUSED(width), wxCoord WXUNUSED(height)) void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxCoord WXUNUSED(width), wxCoord WXUNUSED(height))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::SetClippingRegion Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetClippingRegion Call not yet implemented")); return ; };
void SetPalette(const wxPalette& WXUNUSED(palette)) void SetPalette(const wxPalette& WXUNUSED(palette))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::SetPalette Call not yet implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetPalette Call not yet implemented")); return ; };
void SetBackground( const wxBrush &brush ) ; void SetBackground( const wxBrush &brush ) ;
@@ -296,7 +296,7 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
void SetFont(const wxFont& font) ; void SetFont(const wxFont& font) ;
void SetLogicalFunction(int WXUNUSED(function)) void SetLogicalFunction(int WXUNUSED(function))
{ wxASSERT_MSG (FALSE, wxT("wxSVGFILEDC::SetLogicalFunction Call implemented")); return ; }; { wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetLogicalFunction Call implemented")); return ; };
void SetLogicalScale( double x, double y ) ; void SetLogicalScale( double x, double y ) ;
@@ -311,7 +311,7 @@ class WXDLLIMPEXP_SVG wxSVGFileDC : public wxDC
void SetUserScale(double xScale, double yScale) ; void SetUserScale(double xScale, double yScale) ;
bool StartDoc(const wxString& WXUNUSED(message)) bool StartDoc(const wxString& WXUNUSED(message))
{ return FALSE; }; { return false; };
void StartPage() void StartPage()
{ return ; }; { return ; };

View File

@@ -51,7 +51,7 @@ public:
// Resolution in pixels per logical inch // Resolution in pixels per logical inch
virtual wxSize GetPPI() const; virtual wxSize GetPPI() const;
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc() { } virtual void EndDoc() { }
virtual void StartPage() { } virtual void StartPage() { }
virtual void EndPage() { } virtual void EndPage() { }

View File

@@ -37,8 +37,8 @@ public:
virtual ~wxWindowDC(); virtual ~wxWindowDC();
virtual bool CanDrawBitmap() const { return TRUE; } virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return TRUE; } virtual bool CanGetTextExtent() const { return true; }
protected: protected:
virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSize(int *width, int *height) const;
@@ -65,11 +65,11 @@ protected:
virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y );
virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool useMask = FALSE ); bool useMask = false );
virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int logical_func = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 ); int logical_func = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 );
virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y ); virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y );
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
@@ -128,7 +128,7 @@ public:
void SetUpDC(); void SetUpDC();
void Destroy(); void Destroy();
void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
GdkWindow *GetWindow() { return m_window; } GdkWindow *GetWindow() { return m_window; }

View File

@@ -51,7 +51,7 @@ public:
// Resolution in pixels per logical inch // Resolution in pixels per logical inch
virtual wxSize GetPPI() const; virtual wxSize GetPPI() const;
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc() { } virtual void EndDoc() { }
virtual void StartPage() { } virtual void StartPage() { }
virtual void EndPage() { } virtual void EndPage() { }

View File

@@ -37,8 +37,8 @@ public:
virtual ~wxWindowDC(); virtual ~wxWindowDC();
virtual bool CanDrawBitmap() const { return TRUE; } virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return TRUE; } virtual bool CanGetTextExtent() const { return true; }
protected: protected:
virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSize(int *width, int *height) const;
@@ -65,11 +65,11 @@ protected:
virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y );
virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool useMask = FALSE ); bool useMask = false );
virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int logical_func = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 ); int logical_func = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 );
virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y ); virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y );
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
@@ -128,7 +128,7 @@ public:
void SetUpDC(); void SetUpDC();
void Destroy(); void Destroy();
void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
GdkWindow *GetWindow() { return m_window; } GdkWindow *GetWindow() { return m_window; }

View File

@@ -64,7 +64,7 @@ class WXDLLEXPORT wxDC: public wxDCBase
virtual void Clear(); virtual void Clear();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc(void) {}; virtual void EndDoc(void) {};
virtual void StartPage(void) {}; virtual void StartPage(void) {};
@@ -105,9 +105,9 @@ class WXDLLEXPORT wxDC: public wxDCBase
virtual void SetTextForeground(const wxColour& colour) ; virtual void SetTextForeground(const wxColour& colour) ;
virtual void SetTextBackground(const wxColour& colour) ; virtual void SetTextBackground(const wxColour& colour) ;
void ComputeScaleAndOrigin(void); virtual void ComputeScaleAndOrigin();
public:
public:
wxCoord XDEV2LOG(wxCoord x) const wxCoord XDEV2LOG(wxCoord x) const
{ {
@@ -216,7 +216,7 @@ protected:
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE); bool useMask = false);
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
@@ -224,7 +224,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
// this is gnarly - we can't even call this function DoSetClippingRegion() // this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding // because of virtual function hiding

View File

@@ -64,7 +64,7 @@ class WXDLLEXPORT wxDC: public wxDCBase
virtual void Clear(); virtual void Clear();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc(void) {}; virtual void EndDoc(void) {};
virtual void StartPage(void) {}; virtual void StartPage(void) {};
@@ -105,9 +105,9 @@ class WXDLLEXPORT wxDC: public wxDCBase
virtual void SetTextForeground(const wxColour& colour) ; virtual void SetTextForeground(const wxColour& colour) ;
virtual void SetTextBackground(const wxColour& colour) ; virtual void SetTextBackground(const wxColour& colour) ;
void ComputeScaleAndOrigin(void); virtual void ComputeScaleAndOrigin();
public:
public:
wxCoord XDEV2LOG(wxCoord x) const wxCoord XDEV2LOG(wxCoord x) const
{ {
@@ -216,7 +216,7 @@ protected:
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE); bool useMask = false);
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
@@ -224,7 +224,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
// this is gnarly - we can't even call this function DoSetClippingRegion() // this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding // because of virtual function hiding

View File

@@ -165,7 +165,7 @@ public:
} }
MGLDevCtx *GetMGLDC() const { return m_MGLDC; } MGLDevCtx *GetMGLDC() const { return m_MGLDC; }
void SetMGLDC(MGLDevCtx *mgldc, bool OwnsMGLDC = FALSE); void SetMGLDC(MGLDevCtx *mgldc, bool OwnsMGLDC = false);
protected: protected:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
@@ -192,7 +192,7 @@ protected:
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE); bool useMask = false);
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
@@ -200,7 +200,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
// this is gnarly - we can't even call this function DoSetClippingRegion() // this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding // because of virtual function hiding

View File

@@ -64,7 +64,7 @@ public:
protected: protected:
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE); bool useMask = false);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height); wxCoord width, wxCoord height);
@@ -72,7 +72,7 @@ protected:
virtual void DoGetSizeMM(int* width, int* height) const; virtual void DoGetSizeMM(int* width, int* height) const;
public: public:
void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
wxCoord XDEV2LOG(wxCoord x) const wxCoord XDEV2LOG(wxCoord x) const
{ {

View File

@@ -65,7 +65,7 @@ protected:
virtual void DoGetSizeMM(int* width, int* height) const; virtual void DoGetSizeMM(int* width, int* height) const;
public: public:
void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
wxCoord XDEV2LOG(wxCoord x) const wxCoord XDEV2LOG(wxCoord x) const
{ {

View File

@@ -41,8 +41,8 @@ public:
~wxWindowDC(); ~wxWindowDC();
virtual bool CanDrawBitmap() const { return TRUE; } virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return TRUE; } virtual bool CanGetTextExtent() const { return true; }
protected: protected:
virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSize(int *width, int *height) const;
@@ -54,7 +54,7 @@ protected:
virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y );
virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool useMask = FALSE ); bool useMask = false );
virtual void DoDrawArc(wxCoord x1, wxCoord y1, virtual void DoDrawArc(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2, wxCoord x2, wxCoord y2,
@@ -75,7 +75,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
virtual void DoSetClippingRegionAsRegion(const wxRegion& region); virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
@@ -140,7 +140,7 @@ protected:
void SetUpDC(); void SetUpDC();
void Destroy(); void Destroy();
void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
private: private:
DECLARE_DYNAMIC_CLASS(wxWindowDC) DECLARE_DYNAMIC_CLASS(wxWindowDC)

View File

@@ -1473,10 +1473,7 @@ void wxPostScriptDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
m_signX = (xLeftRight ? 1 : -1); m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? 1 : -1); m_signY = (yBottomUp ? 1 : -1);
// FIXME there is no such function in MSW nor in OS2/PM
#if !defined(__WXMSW__) && !defined(__WXPM__)
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
#endif
} }
void wxPostScriptDC::SetDeviceOrigin( wxCoord x, wxCoord y ) void wxPostScriptDC::SetDeviceOrigin( wxCoord x, wxCoord y )