blob: 5c22a063914fff4d26e08d07dc6614ee17656ee2 [file] [log] [blame]
reed0eafc9b2014-12-23 14:11:11 -08001/*
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
16typedef 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
23SK_C_PLUS_PLUS_BEGIN_GUARD
24
halcanaryc9119062015-09-01 10:45:09 -070025/**
26 Increment the reference count on the given sk_maskfilter_t. Must be
27 balanced by a call to sk_maskfilter_unref().
28*/
reed0eafc9b2014-12-23 14:11:11 -080029void sk_maskfilter_ref(sk_maskfilter_t*);
halcanaryc9119062015-09-01 10:45:09 -070030/**
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*/
reed0eafc9b2014-12-23 14:11:11 -080036void sk_maskfilter_unref(sk_maskfilter_t*);
37
halcanaryc9119062015-09-01 10:45:09 -070038/**
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*/
reed0eafc9b2014-12-23 14:11:11 -080043sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma);
44
45SK_C_PLUS_PLUS_END_GUARD
46
47#endif