X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0db8a70e0c72a9de720b13f76f9e53ec0e9a11fd..655c20fcd5a554a986b93651d8b0bec2afde8573:/src/generic/graphicc.cpp diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 87b4360a66..7ab1b5cdaf 100755 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -186,6 +186,10 @@ public : virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0); + // gets the component valuess of the matrix + virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, + wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const; + // makes this the inverse matrix virtual void Invert(); @@ -866,6 +870,18 @@ void wxCairoMatrixData::Set(wxDouble a, wxDouble b, wxDouble c, wxDouble d, cairo_matrix_init( &m_matrix, a, b, c, d, tx, ty); } +// gets the component valuess of the matrix +void wxCairoMatrixData::Get(wxDouble* a, wxDouble* b, wxDouble* c, + wxDouble* d, wxDouble* tx, wxDouble* ty) const +{ + if (a) *a = m_matrix.xx; + if (b) *b = m_matrix.yx; + if (c) *c = m_matrix.xy; + if (d) *d = m_matrix.yy; + if (tx) *tx= m_matrix.x0; + if (ty) *ty= m_matrix.y0; +} + // makes this the inverse matrix void wxCairoMatrixData::Invert() { @@ -1166,12 +1182,18 @@ public : virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc); +#ifdef __WXMSW__ + virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc); +#endif + virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ); virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ); virtual wxGraphicsContext * CreateContext( wxWindow* window ); + virtual wxGraphicsContext * CreateMeasuringContext(); + // Path virtual wxGraphicsPath CreatePath(); @@ -1222,6 +1244,13 @@ wxGraphicsContext * wxCairoRenderer::CreateContext( const wxWindowDC& dc) return new wxCairoContext(this,dc); } +#ifdef __WXMSW__ +wxGraphicsContext * wxCairoRenderer::CreateContext( const wxMemoryDC& dc) +{ + return NULL; +} +#endif + wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeContext( void * context ) { return new wxCairoContext(this,(cairo_t*)context); @@ -1237,6 +1266,12 @@ wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeWindow( void * windo #endif } +wxGraphicsContext * wxCairoRenderer::CreateMeasuringContext() +{ + return NULL; + // TODO +} + wxGraphicsContext * wxCairoRenderer::CreateContext( wxWindow* window ) { return new wxCairoContext(this, window );