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

Unified Diff: Source/platform/graphics/Image.h

Issue 713263002: Use the viewBox when scaling <svg:image>s non-uniformly w/ pAR=none (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: The computeImageViewportSize approach. Created 6 years, 1 month 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 | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Image.h
diff --git a/Source/platform/graphics/Image.h b/Source/platform/graphics/Image.h
index 8b40396bd8cf139bffc80e43e53e2471367d7625..6c9cef8f3bd81f56d323c99a9ef22a4266230ef4 100644
--- a/Source/platform/graphics/Image.h
+++ b/Source/platform/graphics/Image.h
@@ -84,6 +84,10 @@ public:
virtual bool usesContainerSize() const { return false; }
virtual bool hasRelativeWidth() const { return false; }
virtual bool hasRelativeHeight() const { return false; }
+
+ // Computes (extracts) the intrinsic dimensions and ratio from the Image. The intrinsic ratio
+ // will be the 'viewport' of the image. (Same as the dimensions for a raster image. For SVG
+ // images it can be the dimensions defined by the 'viewBox'.)
virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio);
virtual IntSize size() const = 0;
« no previous file with comments | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698