Added additional overloads for SKMaskFilter.CreateBlur

This commit is contained in:
Matthew Leibowitz 2017-02-04 14:08:27 -06:00
Родитель 6ce786c622
Коммит 8987cd6bbb
4 изменённых файлов: 26 добавлений и 1 удалений

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

@ -552,6 +552,14 @@ namespace SkiaSharp
Normal, Solid, Outer, Inner
}
[Flags]
public enum SKBlurMaskFilterFlags {
None = 0x00,
IgnoreTransform = 0x01,
HighQuality = 0x02,
All = IgnoreTransform | HighQuality,
}
[Obsolete ("Use SKBlendMode instead. May be removed in the next version.")]
public enum SKXferMode {
Clear,

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

@ -44,6 +44,21 @@ namespace SkiaSharp
return GetObject<SKMaskFilter> (SkiaApi.sk_maskfilter_new_blur (blurStyle, sigma));
}
public static SKMaskFilter CreateBlur (SKBlurStyle blurStyle, float sigma, SKBlurMaskFilterFlags flags)
{
return CreateBlur (blurStyle, sigma, SKRect.Empty, flags);
}
public static SKMaskFilter CreateBlur (SKBlurStyle blurStyle, float sigma, SKRect occluder)
{
return CreateBlur (blurStyle, sigma, occluder, SKBlurMaskFilterFlags.None);
}
public static SKMaskFilter CreateBlur (SKBlurStyle blurStyle, float sigma, SKRect occluder, SKBlurMaskFilterFlags flags)
{
return GetObject<SKMaskFilter> (SkiaApi.sk_maskfilter_new_blur_with_flags (blurStyle, sigma, ref occluder, flags));
}
public static SKMaskFilter CreateEmboss(float blurSigma, SKPoint3 direction, float ambient, float specular)
{
return CreateEmboss(blurSigma, direction.X, direction.Y, direction.Z, ambient, specular);

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

@ -631,6 +631,8 @@ namespace SkiaSharp
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_maskfilter_t sk_maskfilter_new_blur(SKBlurStyle style, float sigma);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_maskfilter_t sk_maskfilter_new_blur_with_flags(SKBlurStyle style, float sigma, ref SKRect occluder, SKBlurMaskFilterFlags flags);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_maskfilter_t sk_maskfilter_new_emboss(float blurSigma, float[] direction, float ambient, float specular);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_maskfilter_t sk_maskfilter_new_table(byte[] table /*[256]*/);

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

@ -1 +1 @@
Subproject commit 31d83c5349acda431d76f22216390b49251ba182
Subproject commit 232c059b0bed566f7b52e5c3d02f995f3a98f545