|
@@ -148,67 +148,67 @@ internal sealed class SkCanvas : IDisposable
|
|
|
|
|
|
|
|
private static class API
|
|
private static class API
|
|
|
{
|
|
{
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern IntPtr canvas_create_from_bitmap(IntPtr bitmap);
|
|
public static extern IntPtr canvas_create_from_bitmap(IntPtr bitmap);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_delete(IntPtr canvas);
|
|
public static extern void canvas_delete(IntPtr canvas);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_save(IntPtr canvas);
|
|
public static extern void canvas_save(IntPtr canvas);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_restore(IntPtr canvas);
|
|
public static extern void canvas_restore(IntPtr canvas);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_translate(IntPtr canvas, float x, float y);
|
|
public static extern void canvas_translate(IntPtr canvas, float x, float y);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_rotate(IntPtr canvas, float angle);
|
|
public static extern void canvas_rotate(IntPtr canvas, float angle);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_scale(IntPtr canvas, float factorX, float factorY);
|
|
public static extern void canvas_scale(IntPtr canvas, float factorX, float factorY);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_image(IntPtr canvas, IntPtr image, float width, float height);
|
|
public static extern void canvas_draw_image(IntPtr canvas, IntPtr image, float width, float height);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_picture(IntPtr canvas, IntPtr picture);
|
|
public static extern void canvas_draw_picture(IntPtr canvas, IntPtr picture);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_filled_rectangle(IntPtr canvas, SkRect position, uint color);
|
|
public static extern void canvas_draw_filled_rectangle(IntPtr canvas, SkRect position, uint color);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_stroke_rectangle(IntPtr canvas, SkRect position, float strokeWidth, uint color);
|
|
public static extern void canvas_draw_stroke_rectangle(IntPtr canvas, SkRect position, float strokeWidth, uint color);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_paragraph(IntPtr canvas, IntPtr paragraph);
|
|
public static extern void canvas_draw_paragraph(IntPtr canvas, IntPtr paragraph);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_svg_path(IntPtr canvas, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string svg, uint color);
|
|
public static extern void canvas_draw_svg_path(IntPtr canvas, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string svg, uint color);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_svg(IntPtr canvas, IntPtr svg, float width, float height);
|
|
public static extern void canvas_draw_svg(IntPtr canvas, IntPtr svg, float width, float height);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_draw_overflow_area(IntPtr canvas, SkRect position);
|
|
public static extern void canvas_draw_overflow_area(IntPtr canvas, SkRect position);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_clip_overflow_area(IntPtr canvas, SkRect availableSpace, SkRect requiredSpace);
|
|
public static extern void canvas_clip_overflow_area(IntPtr canvas, SkRect availableSpace, SkRect requiredSpace);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_clip_rectangle(IntPtr canvas, SkRect clipArea);
|
|
public static extern void canvas_clip_rectangle(IntPtr canvas, SkRect clipArea);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_annotate_url(IntPtr canvas, float width, float height, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string url);
|
|
public static extern void canvas_annotate_url(IntPtr canvas, float width, float height, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string url);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_annotate_destination(IntPtr canvas, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string destinationName);
|
|
public static extern void canvas_annotate_destination(IntPtr canvas, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string destinationName);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern void canvas_annotate_destination_link(IntPtr canvas, float width, float height, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string destinationName);
|
|
public static extern void canvas_annotate_destination_link(IntPtr canvas, float width, float height, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaller))] string destinationName);
|
|
|
|
|
|
|
|
- [DllImport(SkiaAPI.LibraryName)]
|
|
|
|
|
|
|
+ [DllImport(SkiaAPI.LibraryName, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern CanvasMatrix canvas_get_matrix(IntPtr canvas);
|
|
public static extern CanvasMatrix canvas_get_matrix(IntPtr canvas);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|