+ return cairo_in_stroke( m_pathContext, x, y) != 0;
+}
+
+//-----------------------------------------------------------------------------
+// wxCairoMatrixData implementation
+//-----------------------------------------------------------------------------
+
+wxCairoMatrixData::wxCairoMatrixData(wxGraphicsRenderer* renderer, const cairo_matrix_t* matrix )
+ : wxGraphicsMatrixData(renderer)
+{
+ if ( matrix )
+ m_matrix = *matrix;
+}
+
+wxCairoMatrixData::~wxCairoMatrixData()
+{
+ // nothing to do
+}
+
+wxGraphicsObjectRefData *wxCairoMatrixData::Clone() const
+{
+ return new wxCairoMatrixData(GetRenderer(),&m_matrix);
+}
+
+// concatenates the matrix
+void wxCairoMatrixData::Concat( const wxGraphicsMatrixData *t )
+{
+ cairo_matrix_multiply( &m_matrix, &m_matrix, (cairo_matrix_t*) t->GetNativeMatrix());
+}
+
+// sets the matrix to the respective values
+void wxCairoMatrixData::Set(wxDouble a, wxDouble b, wxDouble c, wxDouble d,
+ wxDouble tx, wxDouble ty)
+{
+ 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()
+{
+ cairo_matrix_invert( &m_matrix );
+}
+
+// returns true if the elements of the transformation matrix are equal ?
+bool wxCairoMatrixData::IsEqual( const wxGraphicsMatrixData* t) const
+{
+ const cairo_matrix_t* tm = (cairo_matrix_t*) t->GetNativeMatrix();
+ return (
+ m_matrix.xx == tm->xx &&
+ m_matrix.yx == tm->yx &&
+ m_matrix.xy == tm->xy &&
+ m_matrix.yy == tm->yy &&
+ m_matrix.x0 == tm->x0 &&
+ m_matrix.y0 == tm->y0 ) ;
+}
+
+// return true if this is the identity matrix
+bool wxCairoMatrixData::IsIdentity() const
+{
+ return ( m_matrix.xx == 1 && m_matrix.yy == 1 &&
+ m_matrix.yx == 0 && m_matrix.xy == 0 && m_matrix.x0 == 0 && m_matrix.y0 == 0);
+}
+
+//
+// transformation
+//
+
+// add the translation to this matrix
+void wxCairoMatrixData::Translate( wxDouble dx , wxDouble dy )
+{
+ cairo_matrix_translate( &m_matrix, dx, dy) ;
+}
+
+// add the scale to this matrix
+void wxCairoMatrixData::Scale( wxDouble xScale , wxDouble yScale )
+{
+ cairo_matrix_scale( &m_matrix, xScale, yScale) ;
+}
+
+// add the rotation to this matrix (radians)
+void wxCairoMatrixData::Rotate( wxDouble angle )
+{
+ cairo_matrix_rotate( &m_matrix, angle) ;
+}
+
+//
+// apply the transforms
+//
+
+// applies that matrix to the point
+void wxCairoMatrixData::TransformPoint( wxDouble *x, wxDouble *y ) const
+{
+ double lx = *x, ly = *y ;
+ cairo_matrix_transform_point( &m_matrix, &lx, &ly);
+ *x = lx;
+ *y = ly;
+}
+
+// applies the matrix except for translations
+void wxCairoMatrixData::TransformDistance( wxDouble *dx, wxDouble *dy ) const
+{
+ double lx = *dx, ly = *dy ;
+ cairo_matrix_transform_distance( &m_matrix, &lx, &ly);
+ *dx = lx;
+ *dy = ly;
+}
+
+// returns the native representation
+void * wxCairoMatrixData::GetNativeMatrix() const
+{
+ return (void*) &m_matrix;
+}
+
+//-----------------------------------------------------------------------------
+// wxCairoContext implementation
+//-----------------------------------------------------------------------------
+
+class wxCairoOffsetHelper
+{
+public :
+ wxCairoOffsetHelper( cairo_t* ctx , bool offset )