Update xamarin-mobile-bindings with chrome/m58
[platform/upstream/libSkiaSharp.git] / include / c / sk_maskfilter.h
1 /*
2  * Copyright 2014 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY
10
11 #ifndef sk_maskfilter_DEFINED
12 #define sk_maskfilter_DEFINED
13
14 #include "sk_types.h"
15
16 SK_C_PLUS_PLUS_BEGIN_GUARD
17
18 /**
19     Increment the reference count on the given sk_maskfilter_t. Must be
20     balanced by a call to sk_maskfilter_unref().
21 */
22 SK_C_API void sk_maskfilter_ref(sk_maskfilter_t*);
23 /**
24     Decrement the reference count. If the reference count is 1 before
25     the decrement, then release both the memory holding the
26     sk_maskfilter_t and any other associated resources.  New
27     sk_maskfilter_t are created with a reference count of 1.
28 */
29 SK_C_API void sk_maskfilter_unref(sk_maskfilter_t*);
30
31 /**
32     Create a blur maskfilter.
33     @param sk_blurstyle_t The SkBlurStyle to use
34     @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
35 */
36 SK_C_API sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma);
37 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);
38
39 SK_C_API sk_maskfilter_t* sk_maskfilter_new_table(
40     const uint8_t table[256]);
41
42 SK_C_API sk_maskfilter_t* sk_maskfilter_new_gamma(
43     float gamma);
44
45 SK_C_API sk_maskfilter_t* sk_maskfilter_new_clip(
46     uint8_t min,
47     uint8_t max);
48
49 SK_C_PLUS_PLUS_END_GUARD
50
51 #endif