Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: include/effects/SkBlurMaskFilter.h

Issue 264923002: expose ConvertRadiusToSigma to aid clients in the API transition to sigma (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkBlurMaskFilter_DEFINED 8 #ifndef SkBlurMaskFilter_DEFINED
9 #define SkBlurMaskFilter_DEFINED 9 #define SkBlurMaskFilter_DEFINED
10 10
11 // we include this since our callers will need to at least be able to ref/unref 11 // we include this since our callers will need to at least be able to ref/unref
12 #include "SkMaskFilter.h" 12 #include "SkMaskFilter.h"
13 #include "SkScalar.h" 13 #include "SkScalar.h"
14 #include "SkBlurTypes.h" 14 #include "SkBlurTypes.h"
15 15
16 class SK_API SkBlurMaskFilter { 16 class SK_API SkBlurMaskFilter {
17 public: 17 public:
18 #ifdef SK_SUPPORT_LEGACY_BLURMASKFILTER_STYLE 18 #ifdef SK_SUPPORT_LEGACY_BLURMASKFILTER_STYLE
19 enum BlurStyle { 19 enum BlurStyle {
20 kNormal_BlurStyle = kNormal_SkBlurStyle, //!< fuzzy inside and outside 20 kNormal_BlurStyle = kNormal_SkBlurStyle, //!< fuzzy inside and outside
21 kSolid_BlurStyle = kSolid_SkBlurStyle, //!< solid inside, fuzzy outsid e 21 kSolid_BlurStyle = kSolid_SkBlurStyle, //!< solid inside, fuzzy outsid e
22 kOuter_BlurStyle = kOuter_SkBlurStyle, //!< nothing inside, fuzzy outs ide 22 kOuter_BlurStyle = kOuter_SkBlurStyle, //!< nothing inside, fuzzy outs ide
23 kInner_BlurStyle = kInner_SkBlurStyle, //!< fuzzy inside, nothing outs ide 23 kInner_BlurStyle = kInner_SkBlurStyle, //!< fuzzy inside, nothing outs ide
24 24
25 kBlurStyleCount 25 kBlurStyleCount
26 }; 26 };
27 #endif 27 #endif
28 28
29 /**
30 * If radius > 0, return the corresponding sigma, else return 0. Use this t o convert from the
31 * (legacy) idea of specify the blur "radius" to the standard notion of spe cifying its sigma.
32 */
33 static SkScalar ConvertRadiusToSigma(SkScalar radius);
34
29 enum BlurFlags { 35 enum BlurFlags {
30 kNone_BlurFlag = 0x00, 36 kNone_BlurFlag = 0x00,
31 /** The blur layer's radius is not affected by transforms */ 37 /** The blur layer's radius is not affected by transforms */
32 kIgnoreTransform_BlurFlag = 0x01, 38 kIgnoreTransform_BlurFlag = 0x01,
33 /** Use a smother, higher qulity blur algorithm */ 39 /** Use a smother, higher qulity blur algorithm */
34 kHighQuality_BlurFlag = 0x02, 40 kHighQuality_BlurFlag = 0x02,
35 /** mask for all blur flags */ 41 /** mask for all blur flags */
36 kAll_BlurFlag = 0x03 42 kAll_BlurFlag = 0x03
37 }; 43 };
38 44
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 SkScalar ambient, SkScalar specular, 81 SkScalar ambient, SkScalar specular,
76 SkScalar blurRadius); 82 SkScalar blurRadius);
77 83
78 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() 84 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
79 85
80 private: 86 private:
81 SkBlurMaskFilter(); // can't be instantiated 87 SkBlurMaskFilter(); // can't be instantiated
82 }; 88 };
83 89
84 #endif 90 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698