Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Lorentz <bertrand.lorentz@gmail.com>2014-05-30 19:05:04 +0400
committerBertrand Lorentz <bertrand.lorentz@gmail.com>2014-05-30 19:05:04 +0400
commit382ed03051f0ea7b5add210084a3225218f00c6f (patch)
treebc23fe3a2c176ac6f6f6ef60656d87d5e99bf7b9 /mcs/class/Mono.Cairo
parent090895472a1f117fadc74113db49391d7408d527 (diff)
Mono.Cairo: Add Context.InClip method
The cairo_in_clip function was added in cairo 1.10.
Diffstat (limited to 'mcs/class/Mono.Cairo')
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Context.cs5
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs4
2 files changed, 9 insertions, 0 deletions
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
index 1eff46c1ec1..13d08106458 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
@@ -548,6 +548,11 @@ namespace Cairo {
NativeMethods.cairo_reset_clip (handle);
}
+ public bool InClip (double x, double y)
+ {
+ return NativeMethods.cairo_in_clip (handle, x, y);
+ }
+
public bool InStroke (double x, double y)
{
return NativeMethods.cairo_in_stroke (handle, x, y);
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs b/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs
index c53f0009c00..413550d3957 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs
@@ -294,6 +294,10 @@ namespace Cairo
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs (UnmanagedType.U1)]
+ internal static extern bool cairo_in_clip (IntPtr cr, double x, double y);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ [return: MarshalAs (UnmanagedType.U1)]
internal static extern bool cairo_in_fill (IntPtr cr, double x, double y);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]