OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL | 8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL |
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY | 9 // DO NOT USE -- FOR INTERNAL TESTING ONLY |
10 | 10 |
11 #ifndef sk_maskfilter_DEFINED | 11 #ifndef sk_maskfilter_DEFINED |
12 #define sk_maskfilter_DEFINED | 12 #define sk_maskfilter_DEFINED |
13 | 13 |
14 #include "sk_types.h" | 14 #include "sk_types.h" |
15 | 15 |
16 typedef enum { | 16 typedef enum { |
17 NORMAL_SK_BLUR_STYLE, //!< fuzzy inside and outside | 17 NORMAL_SK_BLUR_STYLE, //!< fuzzy inside and outside |
18 SOLID_SK_BLUR_STYLE, //!< solid inside, fuzzy outside | 18 SOLID_SK_BLUR_STYLE, //!< solid inside, fuzzy outside |
19 OUTER_SK_BLUR_STYLE, //!< nothing inside, fuzzy outside | 19 OUTER_SK_BLUR_STYLE, //!< nothing inside, fuzzy outside |
20 INNER_SK_BLUR_STYLE, //!< fuzzy inside, nothing outside | 20 INNER_SK_BLUR_STYLE, //!< fuzzy inside, nothing outside |
21 } sk_blurstyle_t; | 21 } sk_blurstyle_t; |
22 | 22 |
23 SK_C_PLUS_PLUS_BEGIN_GUARD | 23 SK_C_PLUS_PLUS_BEGIN_GUARD |
24 | 24 |
| 25 /** |
| 26 Increment the reference count on the given sk_maskfilter_t. Must be |
| 27 balanced by a call to sk_maskfilter_unref(). |
| 28 */ |
25 void sk_maskfilter_ref(sk_maskfilter_t*); | 29 void sk_maskfilter_ref(sk_maskfilter_t*); |
| 30 /** |
| 31 Decrement the reference count. If the reference count is 1 before |
| 32 the decrement, then release both the memory holding the |
| 33 sk_maskfilter_t and any other associated resources. New |
| 34 sk_maskfilter_t are created with a reference count of 1. |
| 35 */ |
26 void sk_maskfilter_unref(sk_maskfilter_t*); | 36 void sk_maskfilter_unref(sk_maskfilter_t*); |
27 | 37 |
| 38 /** |
| 39 Create a blur maskfilter. |
| 40 @param sk_blurstyle_t The SkBlurStyle to use |
| 41 @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0. |
| 42 */ |
28 sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma); | 43 sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma); |
29 | 44 |
30 SK_C_PLUS_PLUS_END_GUARD | 45 SK_C_PLUS_PLUS_END_GUARD |
31 | 46 |
32 #endif | 47 #endif |
OLD | NEW |