Updated the C# API to match the changed C API

This commit is contained in:
Matthew Leibowitz 2017-01-14 21:06:42 +02:00
Родитель b2e14b9b7a
Коммит ad75683a54
6 изменённых файлов: 27 добавлений и 11 удалений

Просмотреть файл

@ -29,7 +29,17 @@ namespace SkiaSharp
}
public uint UniqueId => SkiaApi.sk_picture_get_unique_id (Handle);
public SKRect Bounds => SkiaApi.sk_picture_get_bounds (Handle);
[Obsolete("Use CullRect instead.")]
public SKRect Bounds => CullRect;
public SKRect CullRect {
get {
SKRect rect = SKRect.Empty;
SkiaApi.sk_picture_get_cull_rect (Handle, ref rect);
return rect;
}
}
}
}

Просмотреть файл

@ -36,9 +36,9 @@ namespace SkiaSharp
}
}
public SKCanvas BeginRecording (SKRect rect)
public SKCanvas BeginRecording (SKRect cullRect)
{
return GetObject<SKCanvas> (SkiaApi.sk_picture_recorder_begin_recording (Handle, ref rect), false);
return GetObject<SKCanvas> (SkiaApi.sk_picture_recorder_begin_recording (Handle, ref cullRect), false);
}
public SKPicture EndRecording ()

Просмотреть файл

@ -33,7 +33,13 @@ namespace SkiaSharp
{
}
public SKRectI Bounds => SkiaApi.sk_region_get_bounds(Handle);
public SKRectI Bounds {
get {
SKRectI rect = SKRectI.Empty;
SkiaApi.sk_region_get_bounds(Handle, ref rect);
return rect;
}
}
public bool Contains(SKRegion src)
{

Просмотреть файл

@ -763,7 +763,7 @@ namespace SkiaSharp
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static uint sk_picture_get_unique_id(sk_picture_t p);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static SKRect sk_picture_get_bounds(sk_picture_t p);
public extern static void sk_picture_get_cull_rect(sk_picture_t p, ref SKRect rect);
// SkShader
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
@ -1305,7 +1305,7 @@ namespace SkiaSharp
[return: MarshalAs(UnmanagedType.I1)]
public extern static bool sk_region_op2(sk_region_t r, sk_region_t src, SKRegionOperation op);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static SKRectI sk_region_get_bounds(sk_region_t r);
public extern static void sk_region_get_bounds(sk_region_t r, ref SKRectI rect);
}
}

Просмотреть файл

@ -46,8 +46,8 @@
</Docs>
</Member>
<Member MemberName="BeginRecording">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCanvas BeginRecording (SkiaSharp.SKRect rect);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class SkiaSharp.SKCanvas BeginRecording(valuetype SkiaSharp.SKRect rect) cil managed" />
<MemberSignature Language="C#" Value="public SkiaSharp.SKCanvas BeginRecording (SkiaSharp.SKRect cullRect);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class SkiaSharp.SKCanvas BeginRecording(valuetype SkiaSharp.SKRect cullRect) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
@ -63,10 +63,10 @@
<ReturnType>SkiaSharp.SKCanvas</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rect" Type="SkiaSharp.SKRect" />
<Parameter Name="cullRect" Type="SkiaSharp.SKRect" />
</Parameters>
<Docs>
<param name="rect">The culling rectangle for the new picture.</param>
<param name="cullRect">The culling rectangle for the new picture.</param>
<summary>Start the recording process and return the recording canvas.</summary>
<returns>Returns the current recording canvas. The same can be retrieved using <see cref="P:SkiaSharp.SKPictureRecorder.RecordingCanvas" />.</returns>
<remarks>

2
externals/skia поставляемый

@ -1 +1 @@
Subproject commit 4c50de3780c86e24326d95898304398b0b002a05
Subproject commit 9c8be5a39d3f884562e0fe0344772c3bc92413f5