SkBlurMaskFilter.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright 2006 The Android Open Source Project
  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. #ifndef SkBlurMaskFilter_DEFINED
  8. #define SkBlurMaskFilter_DEFINED
  9. // we include this since our callers will need to at least be able to ref/unref
  10. #include "include/core/SkBlurTypes.h"
  11. #include "include/core/SkMaskFilter.h"
  12. #include "include/core/SkRect.h"
  13. #include "include/core/SkScalar.h"
  14. class SkRRect;
  15. class SK_API SkBlurMaskFilter {
  16. public:
  17. #ifdef SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
  18. /** Create an emboss maskfilter
  19. @param blurSigma standard deviation of the Gaussian blur to apply
  20. before applying lighting (e.g. 3)
  21. @param direction array of 3 scalars [x, y, z] specifying the direction of the light source
  22. @param ambient 0...1 amount of ambient light
  23. @param specular coefficient for specular highlights (e.g. 8)
  24. @return the emboss maskfilter
  25. */
  26. static sk_sp<SkMaskFilter> MakeEmboss(SkScalar blurSigma, const SkScalar direction[3],
  27. SkScalar ambient, SkScalar specular);
  28. #endif
  29. };
  30. #endif