Index: samplecode/SampleBlur.cpp |
=================================================================== |
--- samplecode/SampleBlur.cpp (revision 11108) |
+++ samplecode/SampleBlur.cpp (working copy) |
@@ -6,12 +6,13 @@ |
* found in the LICENSE file. |
*/ |
#include "SampleCode.h" |
+#include "SkBlurMask.h" |
#include "SkBlurMaskFilter.h" |
+#include "SkCanvas.h" |
#include "SkColorPriv.h" |
#include "SkGradientShader.h" |
+#include "SkUtils.h" |
#include "SkView.h" |
-#include "SkCanvas.h" |
-#include "SkUtils.h" |
static SkBitmap make_bitmap() { |
SkBitmap bm; |
@@ -97,9 +98,9 @@ |
paint.setColor(SK_ColorBLUE); |
for (size_t i = 0; i < SK_ARRAY_COUNT(gRecs); i++) { |
if (gRecs[i].fStyle != NONE) { |
- SkMaskFilter* mf = SkBlurMaskFilter::Create(20, |
- gRecs[i].fStyle, |
- flags); |
+ SkMaskFilter* mf = SkBlurMaskFilter::Create(gRecs[i].fStyle, |
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(20)), |
+ flags); |
paint.setMaskFilter(mf)->unref(); |
} else { |
paint.setMaskFilter(NULL); |
@@ -109,9 +110,9 @@ |
} |
// draw text |
{ |
- SkMaskFilter* mf = SkBlurMaskFilter::Create(4, |
- SkBlurMaskFilter::kNormal_BlurStyle, |
- flags); |
+ SkMaskFilter* mf = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle, |
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4)), |
+ flags); |
paint.setMaskFilter(mf)->unref(); |
SkScalar x = SkIntToScalar(70); |
SkScalar y = SkIntToScalar(400); |