sk_maskfilter.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
  8. // DO NOT USE -- FOR INTERNAL TESTING ONLY
  9. #ifndef sk_maskfilter_DEFINED
  10. #define sk_maskfilter_DEFINED
  11. #include "include/c/sk_types.h"
  12. typedef enum {
  13. NORMAL_SK_BLUR_STYLE, //!< fuzzy inside and outside
  14. SOLID_SK_BLUR_STYLE, //!< solid inside, fuzzy outside
  15. OUTER_SK_BLUR_STYLE, //!< nothing inside, fuzzy outside
  16. INNER_SK_BLUR_STYLE, //!< fuzzy inside, nothing outside
  17. } sk_blurstyle_t;
  18. SK_C_PLUS_PLUS_BEGIN_GUARD
  19. /**
  20. Increment the reference count on the given sk_maskfilter_t. Must be
  21. balanced by a call to sk_maskfilter_unref().
  22. */
  23. SK_API void sk_maskfilter_ref(sk_maskfilter_t*);
  24. /**
  25. Decrement the reference count. If the reference count is 1 before
  26. the decrement, then release both the memory holding the
  27. sk_maskfilter_t and any other associated resources. New
  28. sk_maskfilter_t are created with a reference count of 1.
  29. */
  30. SK_API void sk_maskfilter_unref(sk_maskfilter_t*);
  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_API sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma);
  37. SK_C_PLUS_PLUS_END_GUARD
  38. #endif