2016-07-27 01:46:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SkSVGTransformableNode_DEFINED
|
|
|
|
#define SkSVGTransformableNode_DEFINED
|
|
|
|
|
|
|
|
#include "SkMatrix.h"
|
|
|
|
#include "SkSVGNode.h"
|
|
|
|
|
|
|
|
class SkSVGTransformableNode : public SkSVGNode {
|
|
|
|
public:
|
2017-03-22 16:05:03 +00:00
|
|
|
~SkSVGTransformableNode() override = default;
|
2016-07-27 01:46:34 +00:00
|
|
|
|
2016-08-08 19:58:57 +00:00
|
|
|
void setTransform(const SkSVGTransformType& t) { fTransform = t; }
|
2016-07-27 01:46:34 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
SkSVGTransformableNode(SkSVGTag);
|
|
|
|
|
2016-08-08 18:38:55 +00:00
|
|
|
bool onPrepareToRender(SkSVGRenderContext*) const override;
|
2016-07-27 01:46:34 +00:00
|
|
|
|
2016-08-08 18:38:55 +00:00
|
|
|
void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
|
2016-07-27 01:46:34 +00:00
|
|
|
|
2016-12-08 14:26:47 +00:00
|
|
|
void mapToParent(SkPath*) const;
|
|
|
|
|
2016-07-27 01:46:34 +00:00
|
|
|
private:
|
|
|
|
// FIXME: should be sparse
|
2016-08-08 19:58:57 +00:00
|
|
|
SkSVGTransformType fTransform;
|
2016-07-27 01:46:34 +00:00
|
|
|
|
|
|
|
typedef SkSVGNode INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SkSVGTransformableNode_DEFINED
|