commit | 056385b1c6e1ada38b2980f1ec4a202362c579e7 | [log] [tgz] |
---|---|---|
author | Florin Malita <fmalita@chromium.org> | Tue Oct 27 22:57:56 2020 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Wed Oct 28 14:10:01 2020 +0000 |
tree | 876c4456edd9fae6a3b8ce6624f8d485d19c12f0 | |
parent | 72af24656103cf110e4289f8b98fa193a1bd7f3d [diff] [blame] |
[svg] Convert text-anchor to a presentation attribute https://www.w3.org/TR/SVG11/text.html#TextAnchorProperty Bug: skia:10840 Change-Id: Iff647b62243c42150e873f06215401b5e33705fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330125 Commit-Queue: Florin Malita <fmalita@google.com> Reviewed-by: Tyler Denniston <tdenniston@google.com>
diff --git a/modules/svg/src/SkSVGNode.cpp b/modules/svg/src/SkSVGNode.cpp index 07f3a47..21b5a76 100644 --- a/modules/svg/src/SkSVGNode.cpp +++ b/modules/svg/src/SkSVGNode.cpp
@@ -238,6 +238,11 @@ this->setStrokeWidth(*strokeWidth); } break; + case SkSVGAttribute::kTextAnchor: + if (const SkSVGTextAnchorValue* anchor = v.as<SkSVGTextAnchorValue>()) { + this->setTextAnchor(*anchor); + } + break; case SkSVGAttribute::kVisibility: if (const SkSVGVisibilityValue* visibility = v.as<SkSVGVisibilityValue>()) { this->setVisibility(*visibility);