From 539e27950f79eecf6f82b80dd0bc1ab3f0007958 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 20 Oct 2006 11:59:10 +0000 Subject: [PATCH] dummy implementations for new methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/graphicc.cpp | 39 +++++++++++++++++++++++++++++++++++++-- src/msw/graphics.cpp | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 96e77321fa..bd612032c8 100755 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -238,6 +238,15 @@ public: virtual ~wxCairoContext(); virtual void Clip( const wxRegion ®ion ); + + // clips drawings to the rect + virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + + // resets the clipping to original extent + virtual void ResetClip(); + + virtual void * GetNativeContext(); + virtual void StrokePath( const wxGraphicsPath *p ); virtual void FillPath( const wxGraphicsPath *p , int fillStyle = wxWINDING_RULE ); @@ -305,11 +314,22 @@ wxCairoContext::~wxCairoContext() } -void wxCairoContext::Clip( const wxRegion ®ion ) +void wxCairoContext::Clip( const wxRegion & WXUNUSED(region) ) { - // ClipCGContextToRegion ( m_context, &bounds , (RgnHandle) dc->m_macCurrentClipRgn ); +// TODO } +void wxCairoContext::Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ +// TODO +} + +void wxCairoContext::ResetClip() +{ +// TODO +} + + void wxCairoContext::StrokePath( const wxGraphicsPath *p ) { if ( m_penTransparent ) @@ -861,9 +881,24 @@ void wxCairoContext::SetFont( const wxFont &font ) // TODO FIX SIZE } +void * wxCairoContext::GetNativeContext() +{ + return m_context; +} + wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc ) { return new wxCairoContext(dc); } +wxGraphicsContext* wxGraphicsContext::Create( wxWindow * window ) +{ + return NULL; // TODO +} + +wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context ) +{ + return NULL; // TODO +} + #endif // wxUSE_GRAPHICS_CONTEXT diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 69f3a08e67..560b972339 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -197,6 +197,14 @@ public: virtual ~wxGDIPlusContext(); virtual void Clip( const wxRegion ®ion ); + // clips drawings to the rect + virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + + // resets the clipping to original extent + virtual void ResetClip(); + + virtual void * GetNativeContext(); + virtual void StrokePath( const wxGraphicsPath *p ); virtual void FillPath( const wxGraphicsPath *p , int fillStyle = wxWINDING_RULE ); @@ -388,7 +396,17 @@ wxGDIPlusContext::~wxGDIPlusContext() void wxGDIPlusContext::Clip( const wxRegion & WXUNUSED(region) ) { -// ClipCGContextToRegion ( m_context, &bounds , (RgnHandle) dc->m_macCurrentClipRgn ); +// TODO +} + +void wxGDIPlusContext::Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ +// TODO +} + +void wxGDIPlusContext::ResetClip() +{ +// TODO } void wxGDIPlusContext::StrokePath( const wxGraphicsPath *p ) @@ -927,10 +945,26 @@ void wxGDIPlusContext::SetFont( const wxFont &font ) m_font = new Font( s , size , style ); } +void * wxCairoContext::GetNativeContext() +{ + return m_context; +} + wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc) { return new wxGDIPlusContext( (HDC) dc.GetHDC() ); } +wxGraphicsContext* wxGraphicsContext::Create( wxWindow * window ) +{ + return NULL; // TODO +} + +wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context ) +{ + return NULL; // TODO +} + + #endif // wxUSE_GRAPHICS_CONTEXT -- 2.45.2