1 2 /* 3 * Copyright 2006 The Android Open Source Project 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 10 #ifndef SkBlurMask_DEFINED 11 #define SkBlurMask_DEFINED 12 13 #include "SkShader.h" 14 15 class SkBlurMask { 16 public: 17 enum Style { 18 kNormal_Style, //!< fuzzy inside and outside 19 kSolid_Style, //!< solid inside, fuzzy outside 20 kOuter_Style, //!< nothing inside, fuzzy outside 21 kInner_Style, //!< fuzzy inside, nothing outside 22 23 kStyleCount 24 }; 25 26 enum Quality { 27 kLow_Quality, //!< box blur 28 kHigh_Quality //!< three pass box blur (similar to gaussian) 29 }; 30 31 static bool Blur(SkMask* dst, const SkMask& src, 32 SkScalar radius, Style style, Quality quality, 33 SkIPoint* margin = NULL); 34 }; 35 36 #endif 37 38 39 40