This source file includes following definitions.
- size
- draw
- drawPattern
- nativeImageForCurrentFrame
#include "config.h"
#include "core/svg/graphics/SVGImageForContainer.h"
#include "core/svg/graphics/SVGImage.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/FloatSize.h"
#include "wtf/PassRefPtr.h"
namespace WebCore {
IntSize SVGImageForContainer::size() const
{
FloatSize scaledContainerSize(m_containerSize);
scaledContainerSize.scale(m_zoom);
return roundedIntSize(scaledContainerSize);
}
void SVGImageForContainer::draw(GraphicsContext* context, const FloatRect& dstRect,
const FloatRect& srcRect, CompositeOperator compositeOp, blink::WebBlendMode blendMode)
{
m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, compositeOp, blendMode);
}
void SVGImageForContainer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const FloatSize& scale,
const FloatPoint& phase, CompositeOperator compositeOp, const FloatRect& dstRect, blink::WebBlendMode blendMode, const IntSize& repeatSpacing)
{
m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, scale, phase, compositeOp, dstRect, blendMode, repeatSpacing);
}
PassRefPtr<NativeImageSkia> SVGImageForContainer::nativeImageForCurrentFrame()
{
return m_image->nativeImageForCurrentFrame();
}
}