+// opens (starts) a new subpath
+void wxMacCoreGraphicsPathData::MoveToPoint( wxDouble x1 , wxDouble y1 )
+{
+ CGPathMoveToPoint( m_path , NULL , x1 , y1 );
+}
+
+void wxMacCoreGraphicsPathData::AddLineToPoint( wxDouble x1 , wxDouble y1 )
+{
+ CGPathAddLineToPoint( m_path , NULL , x1 , y1 );
+}
+
+void wxMacCoreGraphicsPathData::AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y )
+{
+ CGPathAddCurveToPoint( m_path , NULL , cx1 , cy1 , cx2, cy2, x , y );
+}
+
+void wxMacCoreGraphicsPathData::AddQuadCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble x, wxDouble y )
+{
+ CGPathAddQuadCurveToPoint( m_path , NULL , cx1 , cy1 , x , y );
+}
+
+void wxMacCoreGraphicsPathData::AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h )
+{
+ CGRect cgRect = { { x , y } , { w , h } };
+ CGPathAddRect( m_path , NULL , cgRect );
+}
+
+void wxMacCoreGraphicsPathData::AddCircle( wxDouble x, wxDouble y , wxDouble r )
+{
+ CGPathAddArc( m_path , NULL , x , y , r , 0.0 , 2 * M_PI , true );
+}
+
+// adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle
+void wxMacCoreGraphicsPathData::AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise )
+{
+ // inverse direction as we the 'normal' state is a y axis pointing down, ie mirrored to the standard core graphics setup
+ CGPathAddArc( m_path, NULL , x, y, r, startAngle, endAngle, !clockwise);
+}
+
+void wxMacCoreGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r )
+{
+ CGPathAddArcToPoint( m_path, NULL , x1, y1, x2, y2, r);
+}
+
+void wxMacCoreGraphicsPathData::AddPath( const wxGraphicsPathData* path )
+{
+ CGPathAddPath( m_path , NULL, (CGPathRef) path->GetNativePath() );
+}
+
+// closes the current subpath
+void wxMacCoreGraphicsPathData::CloseSubpath()
+{
+ CGPathCloseSubpath( m_path );
+}
+
+// gets the last point of the current path, (0,0) if not yet set
+void wxMacCoreGraphicsPathData::GetCurrentPoint( wxDouble* x, wxDouble* y) const
+{
+ CGPoint p = CGPathGetCurrentPoint( m_path );
+ *x = p.x;
+ *y = p.y;
+}
+
+// transforms each point of this path by the matrix
+void wxMacCoreGraphicsPathData::Transform( const wxGraphicsMatrixData* matrix )
+{
+ CGMutablePathRef p = CGPathCreateMutable() ;
+ CGPathAddPath( p, (CGAffineTransform*) matrix->GetNativeMatrix() , m_path );
+ CGPathRelease( m_path );
+ m_path = p;
+}
+
+// gets the bounding box enclosing all points (possibly including control points)
+void wxMacCoreGraphicsPathData::GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const
+{
+ CGRect bounds = CGPathGetBoundingBox( m_path ) ;
+ *x = bounds.origin.x;
+ *y = bounds.origin.y;
+ *w = bounds.size.width;
+ *h = bounds.size.height;
+}
+
+bool wxMacCoreGraphicsPathData::Contains( wxDouble x, wxDouble y, int fillStyle) const
+{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+ if ( CGPathContainsPoint!=NULL )