don't deprecate the entire wxDrawObject class, this results in warnings when we just declare wxDC::DrawObject(); instead deprecate just its ctor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-25 12:01:35 +00:00
parent 004867dbc5
commit 713e92905e
2 changed files with 10 additions and 8 deletions

View File

@@ -125,10 +125,10 @@ enum wxMappingMode
// wxDrawObject helper class // wxDrawObject helper class
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDEPRECATED_BUT_USED_INTERNALLY(wxDrawObject) class WXDLLIMPEXP_CORE wxDrawObject
{ {
public: public:
wxDrawObject() wxDEPRECATED_CONSTRUCTOR(wxDrawObject)()
: m_isBBoxValid(false) : m_isBBoxValid(false)
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0) , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
{ } { }
@@ -1197,12 +1197,7 @@ public:
wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const ); wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const );
wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const ); wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const );
void DrawObject(wxDrawObject* drawobject) wxDEPRECATED( void DrawObject(wxDrawObject* drawobject) );
{
drawobject->Draw(*this);
CalcBoundingBox(drawobject->MinX(),drawobject->MinY());
CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY());
}
#endif // WXWIN_COMPATIBILITY_2_8 #endif // WXWIN_COMPATIBILITY_2_8
#ifdef __WXMSW__ #ifdef __WXMSW__

View File

@@ -1332,6 +1332,13 @@ void wxDC::GetClippingBox(long *x, long *y, long *w, long *h) const
if (h) *h = hh; if (h) *h = hh;
} }
void wxDC::DrawObject(wxDrawObject* drawobject)
{
drawobject->Draw(*this);
CalcBoundingBox(drawobject->MinX(),drawobject->MinY());
CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY());
}
#endif // WXWIN_COMPATIBILITY_2_8 #endif // WXWIN_COMPATIBILITY_2_8
/* /*