Switch to using DoGetClippingRect() instead of DoGetClippingBox()
The new method returns a boolean flag which indicates whether there is any clipping region or not and so is preferable to using the old one and checking its return value to determine this, which can't be done reliably.
This commit is contained in:
@@ -453,11 +453,15 @@ public:
|
||||
// up to date.
|
||||
virtual bool DoGetClippingRect(wxRect& rect) const;
|
||||
|
||||
#if WXWIN_COMPATIBILITY_3_0
|
||||
// This method is kept for backwards compatibility but shouldn't be used
|
||||
// nor overridden in the new code, implement DoGetClippingRect() above
|
||||
// instead.
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const;
|
||||
wxDEPRECATED_BUT_USED_INTERNALLY(
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const
|
||||
);
|
||||
#endif // WXWIN_COMPATIBILITY_3_0
|
||||
|
||||
virtual void DestroyClippingRegion() { ResetClipping(); }
|
||||
|
||||
|
@@ -195,8 +195,7 @@ public:
|
||||
virtual void DoSetDeviceClippingRegion(const wxRegion& region) wxOVERRIDE;
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height) wxOVERRIDE;
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const wxOVERRIDE;
|
||||
virtual bool DoGetClippingRect(wxRect& rect) const wxOVERRIDE;
|
||||
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
wxCoord *x, wxCoord *y,
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const wxOVERRIDE;
|
||||
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) wxOVERRIDE;
|
||||
virtual void DoSetDeviceClippingRegion( const wxRegion ®ion ) wxOVERRIDE;
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const wxOVERRIDE;
|
||||
virtual bool DoGetClippingRect(wxRect& rect) const wxOVERRIDE;
|
||||
|
||||
virtual wxCoord GetCharWidth() const wxOVERRIDE;
|
||||
virtual wxCoord GetCharHeight() const wxOVERRIDE;
|
||||
|
@@ -243,8 +243,7 @@ public:
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height) wxOVERRIDE;
|
||||
virtual void DoSetDeviceClippingRegion(const wxRegion& region) wxOVERRIDE;
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const wxOVERRIDE;
|
||||
virtual bool DoGetClippingRect(wxRect& rect) const wxOVERRIDE;
|
||||
|
||||
virtual void DoGetSizeMM(int* width, int* height) const wxOVERRIDE;
|
||||
|
||||
|
Reference in New Issue
Block a user