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

Unified Diff: Source/core/svg/graphics/filters/SVGFilter.cpp

Issue 337903003: Map light-source oBB-relative coordinates to the user-space of the filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/graphics/filters/Filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/filters/SVGFilter.cpp
diff --git a/Source/core/svg/graphics/filters/SVGFilter.cpp b/Source/core/svg/graphics/filters/SVGFilter.cpp
index bd6fefd724e263b57a8713cd4faa6c8388f3f28f..5a3ae4590edb573a27237c6e95e96d8df0f27376 100644
--- a/Source/core/svg/graphics/filters/SVGFilter.cpp
+++ b/Source/core/svg/graphics/filters/SVGFilter.cpp
@@ -48,6 +48,15 @@ float SVGFilter::applyVerticalScale(float value) const
return Filter::applyVerticalScale(value);
}
+FloatPoint3D SVGFilter::resolve3dPoint(const FloatPoint3D& point) const
+{
+ if (!m_effectBBoxMode)
+ return point;
+ return FloatPoint3D(point.x() * m_targetBoundingBox.width() + m_targetBoundingBox.x(),
+ point.y() * m_targetBoundingBox.height() + m_targetBoundingBox.y(),
+ point.z() * sqrtf(m_targetBoundingBox.size().diagonalLengthSquared() / 2));
Stephen White 2014/06/18 17:21:27 Nit: the Z-scaling for CTM in Skia and Blink use t
+}
+
PassRefPtr<SVGFilter> SVGFilter::create(const AffineTransform& absoluteTransform, const IntRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
{
return adoptRef(new SVGFilter(absoluteTransform, absoluteSourceDrawingRegion, targetBoundingBox, filterRegion, effectBBoxMode));
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/graphics/filters/Filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698