diff options
author | Bertrand Lorentz <bertrand.lorentz@gmail.com> | 2014-05-30 19:05:04 +0400 |
---|---|---|
committer | Bertrand Lorentz <bertrand.lorentz@gmail.com> | 2014-05-30 19:05:04 +0400 |
commit | 382ed03051f0ea7b5add210084a3225218f00c6f (patch) | |
tree | bc23fe3a2c176ac6f6f6ef60656d87d5e99bf7b9 /mcs/class/Mono.Cairo | |
parent | 090895472a1f117fadc74113db49391d7408d527 (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.cs | 5 | ||||
-rw-r--r-- | mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs | 4 |
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)] |