diff options
author | Steve Block <steveblock@google.com> | 2009-12-15 10:12:09 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-12-17 17:41:10 +0000 |
commit | 643ca7872b450ea4efacab6188849e5aac2ba161 (patch) | |
tree | 6982576c228bcd1a7efe98afed544d840751094c /WebCore/svg/graphics/filters/SVGFEOffset.cpp | |
parent | d026980fde6eb3b01c1fe49441174e89cd1be298 (diff) | |
download | external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.zip external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.gz external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.bz2 |
Merge webkit.org at r51976 : Initial merge by git.
Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43
Diffstat (limited to 'WebCore/svg/graphics/filters/SVGFEOffset.cpp')
-rw-r--r-- | WebCore/svg/graphics/filters/SVGFEOffset.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/WebCore/svg/graphics/filters/SVGFEOffset.cpp b/WebCore/svg/graphics/filters/SVGFEOffset.cpp index ce9ee3d..9fd50ed 100644 --- a/WebCore/svg/graphics/filters/SVGFEOffset.cpp +++ b/WebCore/svg/graphics/filters/SVGFEOffset.cpp @@ -74,17 +74,22 @@ void FEOffset::apply(Filter* filter) if (!filterContext) return; + FloatRect sourceImageRect = filter->sourceImageRect(); + sourceImageRect.scale(filter->filterResolution().width(), filter->filterResolution().height()); + if (filter->effectBoundingBoxMode()) { - setDx(dx() * filter->sourceImageRect().width()); - setDy(dy() * filter->sourceImageRect().height()); + m_dx *= sourceImageRect.width(); + m_dy *= sourceImageRect.height(); } + m_dx *= filter->filterResolution().width(); + m_dy *= filter->filterResolution().height(); - FloatRect dstRect = FloatRect(dx() + m_in->subRegion().x() - subRegion().x(), - dy() + m_in->subRegion().y() - subRegion().y(), - m_in->subRegion().width(), - m_in->subRegion().height()); + FloatRect dstRect = FloatRect(m_dx + m_in->scaledSubRegion().x() - scaledSubRegion().x(), + m_dy + m_in->scaledSubRegion().y() - scaledSubRegion().y(), + m_in->scaledSubRegion().width(), + m_in->scaledSubRegion().height()); - filterContext->drawImage(m_in->resultImage()->image(), dstRect); + filterContext->drawImage(m_in->resultImage()->image(), DeviceColorSpace, dstRect); } void FEOffset::dump() |