SkBlurImageFilter.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2011 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 SkBlurImageFilter_DEFINED
  8. #define SkBlurImageFilter_DEFINED
  9. #include "include/core/SkImageFilter.h"
  10. class SK_API SkBlurImageFilter {
  11. public:
  12. /*! \enum TileMode */
  13. enum TileMode {
  14. kClamp_TileMode = 0, /*!< Clamp to the image's edge pixels. */
  15. /*!< This re-weights the filter so samples outside have no effect */
  16. kRepeat_TileMode, /*!< Wrap around to the image's opposite edge. */
  17. kClampToBlack_TileMode, /*!< Fill with transparent black. */
  18. kLast_TileMode = kClampToBlack_TileMode,
  19. // TODO: remove kMax - it is non-standard but Chromium uses it
  20. kMax_TileMode = kClampToBlack_TileMode
  21. };
  22. static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY,
  23. sk_sp<SkImageFilter> input,
  24. const SkImageFilter::CropRect* cropRect = nullptr,
  25. TileMode tileMode = TileMode::kClampToBlack_TileMode);
  26. };
  27. #endif