Author: rolf
Date: 2007-08-31 02:51:18 -0400 (Fri, 31 Aug 2007)
New Revision: 85091

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/shape.cpp
   trunk/moon/src/shape.h
Log:
* src/shape.h, src/shape.cpp: Revert to the old CanFill method for
  shapes, apparently a point is inside a shape unregarding to whether
  it's filled or not, unlike geometries.

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-08-31 01:18:21 UTC (rev 85090)
+++ trunk/moon/src/ChangeLog    2007-08-31 06:51:18 UTC (rev 85091)
@@ -1,3 +1,9 @@
+2007-08-31  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * shape.h, shape.cpp: Revert to the old CanFill method for shapes,
+         apparently a point is inside a shape unregarding to whether it's 
filled
+         or not, unlike geometries.
+
 2007-08-30  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * shape.cpp: Better degenerate handling for round-rectangles and 

Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp    2007-08-31 01:18:21 UTC (rev 85090)
+++ trunk/moon/src/shape.cpp    2007-08-31 06:51:18 UTC (rev 85091)
@@ -418,7 +418,7 @@
 
        cairo_matrix_transform_point (&inverse, &nx, &ny);
 
-       if (cairo_in_stroke (cr, nx, ny) || (IsFilled () && cairo_in_fill (cr, 
nx, ny)))
+       if (cairo_in_stroke (cr, nx, ny) || (CanFill () && cairo_in_fill (cr, 
nx, ny)))
                ret = TRUE;
        
        cairo_new_path (cr);

Modified: trunk/moon/src/shape.h
===================================================================
--- trunk/moon/src/shape.h      2007-08-31 01:18:21 UTC (rev 85090)
+++ trunk/moon/src/shape.h      2007-08-31 06:51:18 UTC (rev 85091)
@@ -77,6 +77,7 @@
        
        virtual bool IsFilled () { return fill; }
        virtual bool IsStroked () { return stroke; }
+       virtual bool CanFill () { return false; }
        virtual FillRule GetFillRule () { return FillRuleNonzero; }
 
        //
@@ -132,6 +133,7 @@
        virtual Type::Kind GetObjectType () { return Type::ELLIPSE; };
 
        virtual void BuildPath (cairo_t *cr);
+       virtual bool CanFill () { return true; }
 };
 
 Ellipse *ellipse_new (void);
@@ -153,6 +155,7 @@
        virtual void OnPropertyChanged (DependencyProperty *prop);
 
        bool GetRadius (double *rx, double *ry);
+       virtual bool CanFill () { return true; }
 };
 
 Rectangle *rectangle_new          (void);
@@ -215,6 +218,7 @@
 
        virtual FillRule GetFillRule ();
 
+       virtual bool CanFill () { return true; }
        virtual void ComputeBounds ();
 
        virtual void OnPropertyChanged (DependencyProperty *prop);
@@ -244,6 +248,7 @@
 
        virtual void BuildPath (cairo_t *cr);
 
+       virtual bool CanFill () { return true; }
        virtual void ComputeBounds ();
 
        virtual FillRule GetFillRule ();
@@ -277,6 +282,7 @@
 
        virtual void ComputeBounds ();
 
+       virtual bool CanFill () { return true; }
        virtual bool IsFilled ();
        virtual FillRule GetFillRule ();
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to