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