SVGImageForContainer.cpp [plain text]
#include "config.h"
#include "SVGImageForContainer.h"
#include "AffineTransform.h"
#include "FloatRect.h"
#include "FloatSize.h"
#include "Image.h"
namespace WebCore {
FloatSize SVGImageForContainer::size() const
{
FloatSize scaledContainerSize(m_containerSize);
scaledContainerSize.scale(m_containerZoom);
return FloatSize(roundedIntSize(scaledContainerSize));
}
ImageDrawResult SVGImageForContainer::draw(GraphicsContext& context, const FloatRect& dstRect,
const FloatRect& srcRect, CompositeOperator compositeOp, BlendMode blendMode, DecodingMode, ImageOrientationDescription)
{
return m_image->drawForContainer(context, m_containerSize, m_containerZoom, m_initialFragmentURL, dstRect, srcRect, compositeOp, blendMode);
}
void SVGImageForContainer::drawPattern(GraphicsContext& context, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, BlendMode blendMode)
{
m_image->drawPatternForContainer(context, m_containerSize, m_containerZoom, m_initialFragmentURL, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode);
}
NativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame(const GraphicsContext* targetContext)
{
return m_image->nativeImageForCurrentFrame(targetContext);
}
}