]> git.saurik.com Git - wxWidgets.git/commitdiff
switching to correct hit-testing
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 22 Apr 2010 06:46:02 +0000 (06:46 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 22 Apr 2010 06:46:02 +0000 (06:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/graphicc.cpp

index c832f183610f702e3d9a0bcd7536b64b8c215450..b21d03e9d7d80d8727c2b969f939e1ce6816c3bd 100644 (file)
@@ -929,9 +929,10 @@ void wxCairoPathData::GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h)
     }
 }
 
-bool wxCairoPathData::Contains( wxDouble x, wxDouble y, wxPolygonFillMode WXUNUSED(fillStyle) ) const
+bool wxCairoPathData::Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle ) const
 {
-    return cairo_in_stroke( m_pathContext, x, y) != 0;
+    cairo_set_fill_rule(m_pathContext,fillStyle==wxODDEVEN_RULE ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);
+    return cairo_in_fill( m_pathContext, x, y) != 0;
 }
 
 //-----------------------------------------------------------------------------