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

Unified Diff: experimental/svg/model/SkSVGRenderContext.h

Issue 2259473002: [SVGDom] Add support for assorted absolute units (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: plumb DPI 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | experimental/svg/model/SkSVGRenderContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/svg/model/SkSVGRenderContext.h
diff --git a/experimental/svg/model/SkSVGRenderContext.h b/experimental/svg/model/SkSVGRenderContext.h
index e6df725a5c37bd517c7af08a53735d2f649669fe..61f87463768493161ff3bef1532854c48a3a701d 100644
--- a/experimental/svg/model/SkSVGRenderContext.h
+++ b/experimental/svg/model/SkSVGRenderContext.h
@@ -20,7 +20,8 @@ class SkSVGLength;
class SkSVGLengthContext {
public:
- SkSVGLengthContext(const SkSize& viewport) : fViewport(viewport) {}
+ SkSVGLengthContext(const SkSize& viewport, SkScalar dpi = 90)
+ : fViewport(viewport), fDPI(dpi) {}
enum class LengthType {
kHorizontal,
@@ -36,7 +37,8 @@ public:
const SkSVGLength& w, const SkSVGLength& h) const;
private:
- SkSize fViewport;
+ SkSize fViewport;
+ SkScalar fDPI;
};
struct SkSVGPresentationContext {
« no previous file with comments | « no previous file | experimental/svg/model/SkSVGRenderContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698