diff options
Diffstat (limited to 'Source/WebCore/svg/graphics/SVGImageForContainer.cpp')
-rw-r--r-- | Source/WebCore/svg/graphics/SVGImageForContainer.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/Source/WebCore/svg/graphics/SVGImageForContainer.cpp b/Source/WebCore/svg/graphics/SVGImageForContainer.cpp index 33d78778c..482c39415 100644 --- a/Source/WebCore/svg/graphics/SVGImageForContainer.cpp +++ b/Source/WebCore/svg/graphics/SVGImageForContainer.cpp @@ -20,40 +20,35 @@ #include "config.h" #include "SVGImageForContainer.h" -#if ENABLE(SVG) #include "AffineTransform.h" #include "FloatRect.h" #include "FloatSize.h" #include "Image.h" -#include "SVGImage.h" namespace WebCore { -IntSize SVGImageForContainer::size() const +FloatSize SVGImageForContainer::size() const { FloatSize scaledContainerSize(m_containerSize); scaledContainerSize.scale(m_zoom); - return roundedIntSize(scaledContainerSize); + return FloatSize(roundedIntSize(scaledContainerSize)); } -void SVGImageForContainer::draw(GraphicsContext* context, const FloatRect& dstRect, - const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) +void SVGImageForContainer::draw(GraphicsContext& context, const FloatRect& dstRect, + const FloatRect& srcRect, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) { - m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, colorSpace, compositeOp, blendMode); + m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, compositeOp, blendMode); } -void SVGImageForContainer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, - const FloatPoint& phase, ColorSpace colorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode 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->setSpaceSize(spaceSize()); - m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, colorSpace, compositeOp, dstRect, blendMode); + m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode); } -PassNativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame() +NativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame(const GraphicsContext* targetContext) { - return m_image->nativeImageForCurrentFrame(); + return m_image->nativeImageForCurrentFrame(targetContext); } } // namespace WebCore - -#endif // ENABLE(SVG) |