5878ecef2f
https://www.w3.org/TR/SVG11/filters.html#feOffsetElement We should now be passing filters-felem-02-f W3C test. Bug: skia:10841 Change-Id: I642cf3c8816b83bdf88066c55103e432ae9c9d5a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354216 Commit-Queue: Tyler Denniston <tdenniston@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
36 lines
1001 B
C++
36 lines
1001 B
C++
/*
|
|
* 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 SkSVGFeOffset_DEFINED
|
|
#define SkSVGFeOffset_DEFINED
|
|
|
|
#include "modules/svg/include/SkSVGFe.h"
|
|
#include "modules/svg/include/SkSVGTypes.h"
|
|
|
|
class SkSVGFeOffset : public SkSVGFe {
|
|
public:
|
|
static sk_sp<SkSVGFeOffset> Make() { return sk_sp<SkSVGFeOffset>(new SkSVGFeOffset()); }
|
|
|
|
SVG_ATTR(Dx, SkSVGNumberType, SkSVGNumberType(0))
|
|
SVG_ATTR(Dy, SkSVGNumberType, SkSVGNumberType(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:
|
|
SkSVGFeOffset() : INHERITED(SkSVGTag::kFeOffset) {}
|
|
|
|
using INHERITED = SkSVGFe;
|
|
};
|
|
|
|
#endif // SkSVGFeOffset_DEFINED
|