| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkSVGTransformableNode.h" | 8 #include "SkSVGTransformableNode.h" |
| 9 #include "SkSVGValue.h" | 9 #include "SkSVGValue.h" |
| 10 | 10 |
| 11 SkSVGTransformableNode::SkSVGTransformableNode(SkSVGTag tag) | 11 SkSVGTransformableNode::SkSVGTransformableNode(SkSVGTag tag) |
| 12 : INHERITED(tag) | 12 : INHERITED(tag) |
| 13 , fMatrix(SkMatrix::I()) { } | 13 , fMatrix(SkMatrix::I()) { } |
| 14 | 14 |
| 15 void SkSVGTransformableNode::onSetAttribute(SkSVGAttribute attr, const SkSVGValu
e& v) { | 15 void SkSVGTransformableNode::onSetAttribute(SkSVGAttribute attr, const SkSVGValu
e& v) { |
| 16 switch (attr) { | 16 switch (attr) { |
| 17 case SkSVGAttribute::transform: | 17 case SkSVGAttribute::kTransform: |
| 18 if (const auto* transform = v.as<SkSVGTransformValue>()) { | 18 if (const auto* transform = v.as<SkSVGTransformValue>()) { |
| 19 this->setTransform(*transform); | 19 this->setTransform(*transform); |
| 20 } | 20 } |
| 21 break; | 21 break; |
| 22 default: | 22 default: |
| 23 this->INHERITED::onSetAttribute(attr, v); | 23 this->INHERITED::onSetAttribute(attr, v); |
| 24 break; | 24 break; |
| 25 } | 25 } |
| 26 } | 26 } |
| OLD | NEW |