You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
/*
|
|
* Copyright 2020 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkSVGFeGaussianBlur_DEFINED
|
|
#define SkSVGFeGaussianBlur_DEFINED
|
|
|
|
#include "modules/svg/include/SkSVGFe.h"
|
|
#include "modules/svg/include/SkSVGTypes.h"
|
|
|
|
class SkSVGFeGaussianBlur : public SkSVGFe {
|
|
public:
|
|
struct StdDeviation {
|
|
SkSVGNumberType fX;
|
|
SkSVGNumberType fY;
|
|
};
|
|
|
|
static sk_sp<SkSVGFeGaussianBlur> Make() {
|
|
return sk_sp<SkSVGFeGaussianBlur>(new SkSVGFeGaussianBlur());
|
|
}
|
|
|
|
SVG_ATTR(StdDeviation, StdDeviation, StdDeviation({0, 0}))
|
|
|
|
protected:
|
|
sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&,
|
|
const SkSVGFilterContext&) const override;
|
|
|
|
std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; }
|
|
|
|
bool parseAndSetAttribute(const char*, const char*) override;
|
|
|
|
private:
|
|
SkSVGFeGaussianBlur() : INHERITED(SkSVGTag::kFeGaussianBlur) {}
|
|
|
|
using INHERITED = SkSVGFe;
|
|
};
|
|
|
|
#endif // SkSVGFeGaussianBlur_DEFINED
|