[Mono-bugs] [Bug 74585][Wis] New - [PATCH] Mono.Cairo binding to add 2 functions
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 12 Apr 2005 18:58:02 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by pedro@kiefer.com.br.
http://bugzilla.ximian.com/show_bug.cgi?id=74585
--- shadow/74585 2005-04-12 18:58:02.000000000 -0400
+++ shadow/74585.tmp.22870 2005-04-12 18:58:02.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 74585
+Product: Mono: Class Libraries
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: pedro@kiefer.com.br
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [PATCH] Mono.Cairo binding to add 2 functions
+
+This patch add the functions InStroke and InFill, so you can check if a
+given point belongs to a stroke / fill.
+
+--- cut ---
+
+diff -Nura Mono.Cairo.Original/Mono.Cairo/Cairo.cs
+Mono.Cairo/Mono.Cairo/Cairo.cs
+--- Mono.Cairo.Original/Mono.Cairo/Cairo.cs 2004-06-22
+00:46:33.000000000 -0300
++++ Mono.Cairo/Mono.Cairo/Cairo.cs 2005-04-12 18:30:53.341837552 -0300
+@@ -269,6 +269,14 @@
+ IntPtr cr, out double x, out double y);
+
+ [DllImport (CairoImp)]
++ public static extern bool cairo_in_stroke (
++ IntPtr cr, out double x, out double y);
++
++ [DllImport (CairoImp)]
++ public static extern bool cairo_in_fill (
++ IntPtr cr, out double x, out double y);
++
++ [DllImport (CairoImp)]
+ public static extern Cairo.FillRule cairo_current_fill_rule
+(IntPtr cr);
+
+ [DllImport (CairoImp)]
+diff -Nura Mono.Cairo.Original/Mono.Cairo/Graphics.cs
+Mono.Cairo/Mono.Cairo/Graphics.cs
+--- Mono.Cairo.Original/Mono.Cairo/Graphics.cs 2004-06-22
+00:46:33.000000000 -0300
++++ Mono.Cairo/Mono.Cairo/Graphics.cs 2005-04-12 18:30:23.983300728 -0300
+@@ -309,6 +309,16 @@
+ CairoAPI.cairo_fill (state);
+ }
+
++ public bool InStroke (double x, double y)
++ {
++ return CairoAPI.cairo_in_stroke (state, x, y);
++ }
++
++ public bool InFill (double x, double y)
++ {
++ return CairoAPI.cairo_in_fill (state, x, y);
++ }
++
+ #endregion
+
+ public void Clip ()