• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 typedef enum {
17     NORMAL_SK_BLUR_STYLE,   //!< fuzzy inside and outside
18     SOLID_SK_BLUR_STYLE,    //!< solid inside, fuzzy outside
19     OUTER_SK_BLUR_STYLE,    //!< nothing inside, fuzzy outside
20     INNER_SK_BLUR_STYLE,    //!< fuzzy inside, nothing outside
21 } sk_blurstyle_t;
22 
23 SK_C_PLUS_PLUS_BEGIN_GUARD
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 */
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 */
36 void sk_maskfilter_unref(sk_maskfilter_t*);
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 */
43 sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma);
44 
45 SK_C_PLUS_PLUS_END_GUARD
46 
47 #endif
48