Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: experimental/svg/model/SkSVGDOM.cpp

Issue 2234863002: [SVGDom] Add rx/ry support for <rect> (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/svg/model/SkSVGAttribute.h ('k') | experimental/svg/model/SkSVGRect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkDOM.h" 9 #include "SkDOM.h"
10 #include "SkParsePath.h" 10 #include "SkParsePath.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 struct AttrParseInfo { 157 struct AttrParseInfo {
158 SkSVGAttribute fAttr; 158 SkSVGAttribute fAttr;
159 bool (*fSetter)(const sk_sp<SkSVGNode>& node, SkSVGAttribute attr, const cha r* stringValue); 159 bool (*fSetter)(const sk_sp<SkSVGNode>& node, SkSVGAttribute attr, const cha r* stringValue);
160 }; 160 };
161 161
162 SortedDictionaryEntry<AttrParseInfo> gAttributeParseInfo[] = { 162 SortedDictionaryEntry<AttrParseInfo> gAttributeParseInfo[] = {
163 { "d" , { SkSVGAttribute::kD , SetPathDataAttribute }}, 163 { "d" , { SkSVGAttribute::kD , SetPathDataAttribute }},
164 { "fill" , { SkSVGAttribute::kFill , SetPaintAttribute }}, 164 { "fill" , { SkSVGAttribute::kFill , SetPaintAttribute }},
165 { "height" , { SkSVGAttribute::kHeight , SetLengthAttribute }}, 165 { "height" , { SkSVGAttribute::kHeight , SetLengthAttribute }},
166 { "rx" , { SkSVGAttribute::kRx , SetLengthAttribute }},
167 { "ry" , { SkSVGAttribute::kRy , SetLengthAttribute }},
166 { "stroke" , { SkSVGAttribute::kStroke , SetPaintAttribute }}, 168 { "stroke" , { SkSVGAttribute::kStroke , SetPaintAttribute }},
167 { "style" , { SkSVGAttribute::kUnknown , SetStyleAttributes }}, 169 { "style" , { SkSVGAttribute::kUnknown , SetStyleAttributes }},
168 { "transform", { SkSVGAttribute::kTransform, SetTransformAttribute }}, 170 { "transform", { SkSVGAttribute::kTransform, SetTransformAttribute }},
169 { "viewBox" , { SkSVGAttribute::kViewBox , SetViewBoxAttribute }}, 171 { "viewBox" , { SkSVGAttribute::kViewBox , SetViewBoxAttribute }},
170 { "width" , { SkSVGAttribute::kWidth , SetLengthAttribute }}, 172 { "width" , { SkSVGAttribute::kWidth , SetLengthAttribute }},
171 { "x" , { SkSVGAttribute::kX , SetLengthAttribute }}, 173 { "x" , { SkSVGAttribute::kX , SetLengthAttribute }},
172 { "y" , { SkSVGAttribute::kY , SetLengthAttribute }}, 174 { "y" , { SkSVGAttribute::kY , SetLengthAttribute }},
173 }; 175 };
174 176
175 SortedDictionaryEntry<sk_sp<SkSVGNode>(*)()> gTagFactories[] = { 177 SortedDictionaryEntry<sk_sp<SkSVGNode>(*)()> gTagFactories[] = {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 SkSVGLengthContext(fContainerSize), 281 SkSVGLengthContext(fContainerSize),
280 SkSVGPresentationContext()); 282 SkSVGPresentationContext());
281 fRoot->render(ctx); 283 fRoot->render(ctx);
282 } 284 }
283 } 285 }
284 286
285 void SkSVGDOM::setContainerSize(const SkSize& containerSize) { 287 void SkSVGDOM::setContainerSize(const SkSize& containerSize) {
286 // TODO: inval 288 // TODO: inval
287 fContainerSize = containerSize; 289 fContainerSize = containerSize;
288 } 290 }
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGAttribute.h ('k') | experimental/svg/model/SkSVGRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698