This source file includes following definitions.
- m_effectBBoxMode
- applyHorizontalScale
- applyVerticalScale
- create
#include "config.h"
#include "core/svg/graphics/filters/SVGFilter.h"
namespace WebCore {
SVGFilter::SVGFilter(const AffineTransform& absoluteTransform, const IntRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
: Filter(absoluteTransform)
, m_absoluteSourceDrawingRegion(absoluteSourceDrawingRegion)
, m_targetBoundingBox(targetBoundingBox)
, m_effectBBoxMode(effectBBoxMode)
{
setFilterRegion(filterRegion);
}
float SVGFilter::applyHorizontalScale(float value) const
{
if (m_effectBBoxMode)
value *= m_targetBoundingBox.width();
return Filter::applyHorizontalScale(value);
}
float SVGFilter::applyVerticalScale(float value) const
{
if (m_effectBBoxMode)
value *= m_targetBoundingBox.height();
return Filter::applyVerticalScale(value);
}
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));
}
}