Used wxConstCast where needed, fixed other compile errors, and removed TABs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -144,11 +144,11 @@ public :
|
|||||||
virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ;
|
virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// returns the native path
|
// returns the native path
|
||||||
virtual void * GetNativePath() const ;
|
virtual void * GetNativePath() const ;
|
||||||
|
|
||||||
// give the native path returned by GetNativePath() back (there might be some deallocations necessary)
|
// give the native path returned by GetNativePath() back (there might be some deallocations necessary)
|
||||||
virtual void UnGetNativePath(void *p) ;
|
virtual void UnGetNativePath(void *p) ;
|
||||||
|
|
||||||
private :
|
private :
|
||||||
cairo_t* m_pathContext;
|
cairo_t* m_pathContext;
|
||||||
@@ -166,14 +166,14 @@ wxCairoPath::~wxCairoPath()
|
|||||||
cairo_destroy(m_pathContext);
|
cairo_destroy(m_pathContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_path_t* wxCairoPath::GetNativePath() const
|
void* wxCairoPath::GetNativePath() const
|
||||||
{
|
{
|
||||||
return cairo_copy_path(m_pathContext) ;
|
return cairo_copy_path(m_pathContext) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCairoPath::UnGetNativePath(void *p)
|
void wxCairoPath::UnGetNativePath(void *p)
|
||||||
{
|
{
|
||||||
cairo_path_destroy((cairo_path_t*)p);
|
cairo_path_destroy((cairo_path_t*)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -252,10 +252,10 @@ public:
|
|||||||
// clips drawings to the rect
|
// clips drawings to the rect
|
||||||
virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h );
|
virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h );
|
||||||
|
|
||||||
// resets the clipping to original extent
|
// resets the clipping to original extent
|
||||||
virtual void ResetClip();
|
virtual void ResetClip();
|
||||||
|
|
||||||
virtual void * GetNativeContext();
|
virtual void * GetNativeContext();
|
||||||
|
|
||||||
virtual void StrokePath( const wxGraphicsPath *p );
|
virtual void StrokePath( const wxGraphicsPath *p );
|
||||||
virtual void FillPath( const wxGraphicsPath *p , int fillStyle = wxWINDING_RULE );
|
virtual void FillPath( const wxGraphicsPath *p , int fillStyle = wxWINDING_RULE );
|
||||||
@@ -345,7 +345,7 @@ void wxCairoContext::StrokePath( const wxGraphicsPath *path )
|
|||||||
if ( m_penTransparent )
|
if ( m_penTransparent )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cairo_path_t* cp = (cairo_path_t*) path->GetNativePath() ;
|
cairo_path_t* cp = (cairo_path_t*) path->GetNativePath() ;
|
||||||
cairo_append_path(m_context,cp);
|
cairo_append_path(m_context,cp);
|
||||||
|
|
||||||
// setup pen
|
// setup pen
|
||||||
@@ -526,14 +526,14 @@ void wxCairoContext::StrokePath( const wxGraphicsPath *path )
|
|||||||
if ( userLengths )
|
if ( userLengths )
|
||||||
delete[] userLengths;
|
delete[] userLengths;
|
||||||
cairo_stroke(m_context);
|
cairo_stroke(m_context);
|
||||||
path->UnGetNativePath(cp);
|
wxConstCast(path, wxGraphicsPath)->UnGetNativePath(cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCairoContext::FillPath( const wxGraphicsPath *path , int fillStyle )
|
void wxCairoContext::FillPath( const wxGraphicsPath *path , int fillStyle )
|
||||||
{
|
{
|
||||||
if ( !m_brushTransparent )
|
if ( !m_brushTransparent )
|
||||||
{
|
{
|
||||||
cairo_path_t* cp = (cairo_path_t*) path->GetNativePath() ;
|
cairo_path_t* cp = (cairo_path_t*) path->GetNativePath() ;
|
||||||
cairo_append_path(m_context,cp);
|
cairo_append_path(m_context,cp);
|
||||||
|
|
||||||
if ( m_brushPattern )
|
if ( m_brushPattern )
|
||||||
@@ -550,7 +550,7 @@ void wxCairoContext::FillPath( const wxGraphicsPath *path , int fillStyle )
|
|||||||
|
|
||||||
cairo_set_fill_rule(m_context,fillStyle==wxODDEVEN_RULE ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);
|
cairo_set_fill_rule(m_context,fillStyle==wxODDEVEN_RULE ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);
|
||||||
cairo_fill(m_context);
|
cairo_fill(m_context);
|
||||||
path->UnGetNativePath(cp);
|
wxConstCast(path, wxGraphicsPath)->UnGetNativePath(cp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -891,7 +891,7 @@ void wxCairoContext::SetFont( const wxFont &font )
|
|||||||
|
|
||||||
void * wxCairoContext::GetNativeContext()
|
void * wxCairoContext::GetNativeContext()
|
||||||
{
|
{
|
||||||
return m_context;
|
return m_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc )
|
wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc )
|
||||||
@@ -901,12 +901,12 @@ wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc )
|
|||||||
|
|
||||||
wxGraphicsContext* wxGraphicsContext::Create( wxWindow * window )
|
wxGraphicsContext* wxGraphicsContext::Create( wxWindow * window )
|
||||||
{
|
{
|
||||||
return NULL; // TODO
|
return NULL; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
|
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
|
||||||
{
|
{
|
||||||
return NULL; // TODO
|
return NULL; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_GRAPHICS_CONTEXT
|
#endif // wxUSE_GRAPHICS_CONTEXT
|
||||||
|
|||||||
Reference in New Issue
Block a user