From f2b905d787e575675ad9a036824ff9ad310e9006 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 22 Apr 2010 06:46:02 +0000 Subject: [PATCH] switching to correct hit-testing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/graphicc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index c832f18361..b21d03e9d7 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -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; } //----------------------------------------------------------------------------- -- 2.47.2