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

Unified Diff: experimental/svg/model/SkSVGShape.cpp

Issue 2202053002: [SVGDom/experimental] Initial SVGLength support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: cleanup Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: experimental/svg/model/SkSVGShape.cpp
diff --git a/experimental/svg/model/SkSVGShape.cpp b/experimental/svg/model/SkSVGShape.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fcbb4783915e589cdca4511a03d730deb11e0b7a
--- /dev/null
+++ b/experimental/svg/model/SkSVGShape.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkSVGRenderContext.h"
+#include "SkSVGShape.h"
+
+SkSVGShape::SkSVGShape(SkSVGTag t) : INHERITED(t) {}
+
+void SkSVGShape::onRender(SkCanvas* canvas, const SkSVGRenderContext& ctx) const {
+ if (const SkPaint* fillPaint = ctx.fillPaint()) {
+ this->onDraw(canvas, ctx.lengthContext(), *fillPaint);
+ }
+
+ if (const SkPaint* strokePaint = ctx.strokePaint()) {
+ this->onDraw(canvas, ctx.lengthContext(), *strokePaint);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698