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 8 #ifndef SkBlurTypes_DEFINED 9 #define SkBlurTypes_DEFINED 10 11 #include "include/core/SkRect.h" 12 #include "include/core/SkScalar.h" 13 #include "include/core/SkTypes.h" 14 15 enum SkBlurStyle : int { 16 kNormal_SkBlurStyle, //!< fuzzy inside and outside 17 kSolid_SkBlurStyle, //!< solid inside, fuzzy outside 18 kOuter_SkBlurStyle, //!< nothing inside, fuzzy outside 19 kInner_SkBlurStyle, //!< fuzzy inside, nothing outside 20 21 kLastEnum_SkBlurStyle = kInner_SkBlurStyle, 22 }; 23 24 struct SkBlurArg { 25 SkRect srcRect; 26 SkRect dstRect; 27 SkScalar sigma { 1E-6 }; 28 float saturation { 1.0 }; 29 float brightness { 1.0 }; SkBlurArgSkBlurArg30 SkBlurArg(const SkRect& srcRect, const SkRect& dstRect, const SkScalar& sigma, 31 float saturation, float brightness) 32 { 33 this->srcRect = srcRect; 34 this->dstRect = dstRect; 35 this->sigma = sigma; 36 this->saturation = saturation; 37 this->brightness = brightness; 38 } 39 }; 40 41 #endif 42