Updated the various APIs with the correct implementations
This commit is contained in:
Родитель
73b57a3d40
Коммит
527485eb00
|
@ -178,6 +178,14 @@ namespace SkiaSharp
|
|||
SkiaApi.sk_canvas_clip_path_with_operation (Handle, path.Handle, operation, antialias);
|
||||
}
|
||||
|
||||
public void ClipRegion (SKRegion region, SKClipOperation operation = SKClipOperation.Intersect)
|
||||
{
|
||||
if (region == null)
|
||||
throw new ArgumentNullException (nameof (region));
|
||||
|
||||
SkiaApi.sk_canvas_clip_region (Handle, region.Handle, operation);
|
||||
}
|
||||
|
||||
public SKRect ClipBounds {
|
||||
get {
|
||||
var bounds = SKRect.Empty;
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SkiaSharp
|
||||
{
|
||||
|
@ -66,11 +64,11 @@ namespace SkiaSharp
|
|||
return SkiaApi.sk_region_intersects(Handle, rect);
|
||||
}
|
||||
|
||||
public bool Set(SKRegion region)
|
||||
public bool SetRegion(SKRegion region)
|
||||
{
|
||||
if (region == null)
|
||||
throw new ArgumentNullException (nameof (region));
|
||||
return SkiaApi.sk_region_set(Handle, region.Handle);
|
||||
return SkiaApi.sk_region_set_region(Handle, region.Handle);
|
||||
}
|
||||
|
||||
public bool SetRect(SKRectI rect)
|
||||
|
|
|
@ -133,10 +133,6 @@ namespace SkiaSharp
|
|||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_clip_rect(sk_canvas_t t, ref SKRect rect);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_clip_rect2(sk_canvas_t t, ref SKRect rect, SKRegionOperation op);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_clip_region(sk_canvas_t t, sk_region_t region, SKRegionOperation op);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_clip_path(sk_canvas_t t, sk_path_t p);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_draw_paint(sk_canvas_t t, sk_paint_t p);
|
||||
|
@ -202,6 +198,8 @@ namespace SkiaSharp
|
|||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_clip_path_with_operation(sk_canvas_t t, sk_path_t cpath, SKClipOperation op, bool doAA);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void sk_canvas_clip_region(sk_canvas_t t, sk_region_t region, SKClipOperation op);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public extern static bool sk_canvas_get_clip_device_bounds(sk_canvas_t t, ref SKRectI cbounds);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
@ -1223,7 +1221,7 @@ namespace SkiaSharp
|
|||
public extern static bool sk_region_intersects(sk_region_t r, SKRectI rect);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public extern static bool sk_region_set(sk_region_t r, sk_region_t src);
|
||||
public extern static bool sk_region_set_region(sk_region_t r, sk_region_t src);
|
||||
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public extern static bool sk_region_set_rect(sk_region_t r, ref SKRectI rect);
|
||||
|
|
|
@ -255,9 +255,9 @@
|
|||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Set">
|
||||
<MemberSignature Language="C#" Value="public bool Set (SkiaSharp.SKRegion region);" />
|
||||
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool Set(class SkiaSharp.SKRegion region) cil managed" />
|
||||
<Member MemberName="SetRegion">
|
||||
<MemberSignature Language="C#" Value="public bool SetRegion (SkiaSharp.SKRegion region);" />
|
||||
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool SetRegion(class SkiaSharp.SKRegion region) cil managed" />
|
||||
<MemberType>Method</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyVersion>1.55.0.0</AssemblyVersion>
|
||||
|
@ -270,7 +270,7 @@
|
|||
</Parameters>
|
||||
<Docs>
|
||||
<param name="region">The replacement region.</param>
|
||||
<summary>Replace this region with the specified region.</summary>
|
||||
<summary>Set this region to the specified region.</summary>
|
||||
<returns>Return true if the resulting region is non-empty.</returns>
|
||||
<remarks>
|
||||
<para></para>
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cf696ea4ec7eda974739ab78fee84075799773ef
|
||||
Subproject commit 80a01af1920b043aa654be8644591baeb8def7c0
|
Загрузка…
Ссылка в новой задаче