| 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkMatrix.h" | 9 #include "SkMatrix.h" |
| 10 #include "SkSVGNode.h" | 10 #include "SkSVGNode.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 this->onRender(canvas, *localContext); | 34 this->onRender(canvas, *localContext); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void SkSVGNode::setAttribute(SkSVGAttribute attr, const SkSVGValue& v) { | 37 void SkSVGNode::setAttribute(SkSVGAttribute attr, const SkSVGValue& v) { |
| 38 this->onSetAttribute(attr, v); | 38 this->onSetAttribute(attr, v); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void SkSVGNode::onSetAttribute(SkSVGAttribute attr, const SkSVGValue& v) { | 41 void SkSVGNode::onSetAttribute(SkSVGAttribute attr, const SkSVGValue& v) { |
| 42 switch (attr) { | 42 switch (attr) { |
| 43 case SkSVGAttribute::fill: | 43 case SkSVGAttribute::kFill: |
| 44 if (const SkSVGColorValue* color = v.as<SkSVGColorValue>()) { | 44 if (const SkSVGColorValue* color = v.as<SkSVGColorValue>()) { |
| 45 fPresentationAttributes.setFill(*color); | 45 fPresentationAttributes.setFill(*color); |
| 46 } | 46 } |
| 47 break; | 47 break; |
| 48 case SkSVGAttribute::stroke: | 48 case SkSVGAttribute::kStroke: |
| 49 if (const SkSVGColorValue* color = v.as<SkSVGColorValue>()) { | 49 if (const SkSVGColorValue* color = v.as<SkSVGColorValue>()) { |
| 50 fPresentationAttributes.setStroke(*color); | 50 fPresentationAttributes.setStroke(*color); |
| 51 } | 51 } |
| 52 break; | 52 break; |
| 53 default: | 53 default: |
| 54 break; | 54 break; |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 const SkMatrix& SkSVGNode::onLocalMatrix() const { | 58 const SkMatrix& SkSVGNode::onLocalMatrix() const { |
| 59 return SkMatrix::I(); | 59 return SkMatrix::I(); |
| 60 } | 60 } |
| OLD | NEW |