@param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
*/
SK_C_API sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma);
+SK_C_API sk_maskfilter_t* sk_maskfilter_new_blur_with_flags(sk_blurstyle_t, float sigma, const sk_rect_t* occluder, sk_blurmaskfilter_blurflags_t flags);
+
/** Create an emboss maskfilter
@param blurSigma standard deviation of the Gaussian blur to apply
} sk_blurstyle_t;
typedef enum {
+ NONE_SK_BLUR_MASK_FILTER_BLUR_FLAGS = 0x00,
+ IGNORE_TRANSFORM_SK_BLUR_MASK_FILTER_BLUR_FLAGS = 0x01,
+ HIGHT_QUALITY_SK_BLUR_MASK_FILTER_BLUR_FLAGS = 0x02,
+ ALL_SK_BLUR_MASK_FILTER_BLUR_FLAGS = 0x03,
+} sk_blurmaskfilter_blurflags_t;
+
+typedef enum {
CW_SK_PATH_DIRECTION,
CCW_SK_PATH_DIRECTION,
} sk_path_direction_t;
#include "sk_types_priv.h"
#include "SkShadowMaskFilter.h"
#include "SkBitmapScaler.h"
+#include "SkBlurMaskFilter.h"
#if __cplusplus >= 199711L
static_assert ((int)SkBlurStyle::kOuter_SkBlurStyle == (int)OUTER_SK_BLUR_STYLE, ASSERT_MSG(SkBlurStyle, sk_blurstyle_t));
static_assert ((int)SkBlurStyle::kInner_SkBlurStyle == (int)INNER_SK_BLUR_STYLE, ASSERT_MSG(SkBlurStyle, sk_blurstyle_t));
+// sk_blurmaskfilter_blurflags_t
+static_assert ((int)SkBlurMaskFilter::BlurFlags::kNone_BlurFlag == (int)NONE_SK_BLUR_MASK_FILTER_BLUR_FLAGS, ASSERT_MSG(SkBlurMaskFilter::BlurFlags, sk_blurmaskfilter_blurflags_t));
+static_assert ((int)SkBlurMaskFilter::BlurFlags::kIgnoreTransform_BlurFlag == (int)IGNORE_TRANSFORM_SK_BLUR_MASK_FILTER_BLUR_FLAGS, ASSERT_MSG(SkBlurMaskFilter::BlurFlags, sk_blurmaskfilter_blurflags_t));
+static_assert ((int)SkBlurMaskFilter::BlurFlags::kHighQuality_BlurFlag == (int)HIGHT_QUALITY_SK_BLUR_MASK_FILTER_BLUR_FLAGS, ASSERT_MSG(SkBlurMaskFilter::BlurFlags, sk_blurmaskfilter_blurflags_t));
+static_assert ((int)SkBlurMaskFilter::BlurFlags::kAll_BlurFlag == (int)ALL_SK_BLUR_MASK_FILTER_BLUR_FLAGS, ASSERT_MSG(SkBlurMaskFilter::BlurFlags, sk_blurmaskfilter_blurflags_t));
+
// sk_stroke_cap_t
static_assert ((int)SkPaint::Cap::kButt_Cap == (int)BUTT_SK_STROKE_CAP, ASSERT_MSG(SkPaint::Cap, sk_stroke_cap_t));
static_assert ((int)SkPaint::Cap::kRound_Cap == (int)ROUND_SK_STROKE_CAP, ASSERT_MSG(SkPaint::Cap, sk_stroke_cap_t));
return ToMaskFilter(SkBlurMaskFilter::Make((SkBlurStyle)cstyle, sigma).release());
}
+sk_maskfilter_t* sk_maskfilter_new_blur_with_flags(sk_blurstyle_t cstyle, float sigma, const sk_rect_t* occluder, sk_blurmaskfilter_blurflags_t flags) {
+ return ToMaskFilter(SkBlurMaskFilter::Make((SkBlurStyle)cstyle, sigma, AsRect(*occluder), (SkBlurMaskFilter::BlurFlags)flags).release());
+}
+
sk_maskfilter_t* sk_maskfilter_new_shadow(float occluderHeight, const sk_point3_t* lightPos, float lightRadius, float ambientAlpha, float spotAlpha, sk_shadowmaskfilter_shadowflags_t flags) {
return ToMaskFilter(SkShadowMaskFilter::Make(occluderHeight, AsPoint3(*lightPos), lightRadius, ambientAlpha, spotAlpha, (SkShadowMaskFilter::ShadowFlags)flags).release());
}