X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2d6d210991fb1d29570a46e0f26c7a4b9cf89ff..187d815255d240350c598721db1e0c1b4d3fb527:/src/common/graphcmn.cpp diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index ff9afe733e..f921072da7 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -48,6 +48,8 @@ static inline double DegToRad(double deg) //----------------------------------------------------------------------------- +IMPLEMENT_ABSTRACT_CLASS(wxGraphicsPath, wxObject) + wxPoint2DDouble wxGraphicsPath::GetCurrentPoint() { wxDouble x,y; @@ -150,6 +152,8 @@ void wxGraphicsPath::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDo // wxGraphicsContext Convenience Methods //----------------------------------------------------------------------------- +IMPLEMENT_ABSTRACT_CLASS(wxGraphicsContext, wxObject) + void wxGraphicsContext::DrawPath( const wxGraphicsPath *path, int fillStyle ) { FillPath( path , fillStyle ); @@ -274,6 +278,11 @@ wxGCDC::wxGCDC() Init(); } +void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx ) +{ + delete m_graphicContext; + m_graphicContext = ctx; +} wxGCDC::wxGCDC(const wxWindowDC& dc) { @@ -1084,7 +1093,7 @@ bool wxGCDC::DoBlit( wxCoord wwdest = LogicalToDeviceXRel(width); wxCoord hhdest = LogicalToDeviceYRel(height); - wxMemoryDC* memdc = dynamic_cast(source); + wxMemoryDC* memdc = wxDynamicCast(source,wxMemoryDC); if ( memdc && logical_func == wxCOPY ) { wxBitmap blit = memdc->GetSelectedBitmap(); @@ -1126,7 +1135,7 @@ bool wxGCDC::DoBlit( } else { - wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ); + wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts, and only with wxCOPY logical operation.") ); return false; }