From 0cb06f523aeb5cb0d31db7d4c36254d17dce33b7 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 17 Aug 2016 04:36:33 +0200 Subject: [PATCH] Revert "Using the SkPaint::Style instead of a simple bool" This reverts commit b1845de376ff9ea18be62b2f0d5b016f9e9621ef. --- binding/Binding/Definitions.cs | 7 ------- binding/Binding/SKPaint.cs | 13 ++----------- binding/Binding/SkiaApi.cs | 4 ++-- skia | 2 +- 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/binding/Binding/Definitions.cs b/binding/Binding/Definitions.cs index 09971e5f..fe7d12b4 100644 --- a/binding/Binding/Definitions.cs +++ b/binding/Binding/Definitions.cs @@ -347,13 +347,6 @@ namespace SkiaSharp ClampToBlack, } - public enum SKPaintStyle - { - Fill, - Stroke, - StrokeAndFill, - } - public enum SKRegionOperation { Difference, diff --git a/binding/Binding/SKPaint.cs b/binding/Binding/SKPaint.cs index a173b4d6..82aa4681 100644 --- a/binding/Binding/SKPaint.cs +++ b/binding/Binding/SKPaint.cs @@ -64,19 +64,10 @@ namespace SkiaSharp public bool IsStroke { get { - return SkiaApi.sk_paint_get_style (Handle) != SKPaintStyle.Fill; + return SkiaApi.sk_paint_is_stroke (Handle); } set { - SkiaApi.sk_paint_set_style (Handle, value ? SKPaintStyle.Stroke : SKPaintStyle.Fill); - } - } - - public SKPaintStyle Style { - get { - return SkiaApi.sk_paint_get_style (Handle); - } - set { - SkiaApi.sk_paint_set_style (Handle, value); + SkiaApi.sk_paint_set_stroke (Handle, value); } } diff --git a/binding/Binding/SkiaApi.cs b/binding/Binding/SkiaApi.cs index 73d61c85..06104cfb 100755 --- a/binding/Binding/SkiaApi.cs +++ b/binding/Binding/SkiaApi.cs @@ -195,9 +195,9 @@ namespace SkiaSharp [DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)] public extern static void sk_paint_set_color(sk_paint_t t, SKColor color); [DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)] - public extern static SKPaintStyle sk_paint_get_style(sk_paint_t t); + public extern static bool sk_paint_is_stroke(sk_paint_t t); [DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)] - public extern static void sk_paint_set_style(sk_paint_t t, SKPaintStyle style); + public extern static void sk_paint_set_stroke(sk_paint_t t, bool v); [DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)] public extern static float sk_paint_get_stroke_width(sk_paint_t paint); [DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)] diff --git a/skia b/skia index 081595da..3343ae58 160000 --- a/skia +++ b/skia @@ -1 +1 @@ -Subproject commit 081595dac0040797ac8a964a75834f7d1c0b47d2 +Subproject commit 3343ae587f9da023dfd43ed1ab12dcddf0bd097b