5af16f8d67
http://codereview.appspot.com/4965057/ Reduce the size of filter masks, fix HQ blur when clipped, and add tests. git-svn-id: http://skia.googlecode.com/svn/trunk@2211 2bbb7eff-a529-9590-31e7-b0007b416f81
40 lines
865 B
C++
40 lines
865 B
C++
|
|
/*
|
|
* Copyright 2006 The Android Open Source Project
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
|
|
#ifndef SkBlurMask_DEFINED
|
|
#define SkBlurMask_DEFINED
|
|
|
|
#include "SkShader.h"
|
|
|
|
class SkBlurMask {
|
|
public:
|
|
enum Style {
|
|
kNormal_Style, //!< fuzzy inside and outside
|
|
kSolid_Style, //!< solid inside, fuzzy outside
|
|
kOuter_Style, //!< nothing inside, fuzzy outside
|
|
kInner_Style, //!< fuzzy inside, nothing outside
|
|
|
|
kStyleCount
|
|
};
|
|
|
|
enum Quality {
|
|
kLow_Quality, //!< box blur
|
|
kHigh_Quality //!< three pass box blur (similar to gaussian)
|
|
};
|
|
|
|
static bool Blur(SkMask* dst, const SkMask& src,
|
|
SkScalar radius, Style style, Quality quality,
|
|
SkIPoint* margin = NULL);
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|