Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkSVGFeGaussianBlur.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2020 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
14
15bool SkSVGFeGaussianBlur::parseAndSetAttribute(const char* name, const char* value) {
17 this->setStdDeviation(SkSVGAttributeParser::parse<SkSVGFeGaussianBlur::StdDeviation>(
18 "stdDeviation", name, value));
19}
20
22 const SkSVGFilterContext& fctx) const {
23 const auto sigma = SkV2{fStdDeviation.fX, fStdDeviation.fY}
25
27 sigma.x, sigma.y,
28 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
29 this->resolveFilterSubregion(ctx, fctx));
30}
31
32template <>
33bool SkSVGAttributeParser::parse<SkSVGFeGaussianBlur::StdDeviation>(
35 std::vector<SkSVGNumberType> values;
36 if (!this->parse(&values)) {
37 return false;
38 }
39
40 stdDeviation->fX = values[0];
41 stdDeviation->fY = values.size() > 1 ? values[1] : values[0];
42 return true;
43}
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
sk_sp< SkImageFilter > onMakeImageFilter(const SkSVGRenderContext &, const SkSVGFilterContext &) const override
bool parseAndSetAttribute(const char *, const char *) override
bool parseAndSetAttribute(const char *, const char *) override
Definition SkSVGFe.cpp:93
sk_sp< SkImageFilter > resolveInput(const SkSVGRenderContext &, const SkSVGFeInputType &) const
const SkSVGObjectBoundingBoxUnits & primitiveUnits() const
OBBTransform transformForCurrentOBB(SkSVGObjectBoundingBoxUnits) const
uint8_t value
const char * name
Definition fuchsia.cc:50
Definition SkM44.h:19