SVGPaintServerPattern.h [plain text]
#ifndef SVGPaintServerPattern_h
#define SVGPaintServerPattern_h
#if ENABLE(SVG)
#include "AffineTransform.h"
#include "FloatRect.h"
#include "SVGPaintServer.h"
#include <wtf/OwnPtr.h>
namespace WebCore {
class GraphicsContext;
class ImageBuffer;
class SVGPatternElement;
class SVGPaintServerPattern : public SVGPaintServer {
public:
SVGPaintServerPattern(const SVGPatternElement*);
virtual ~SVGPaintServerPattern();
virtual SVGPaintServerType type() const { return PatternPaintServer; }
void setPatternBoundaries(const FloatRect&);
FloatRect patternBoundaries() const;
ImageBuffer* tile() const;
void setTile(std::auto_ptr<ImageBuffer>);
AffineTransform patternTransform() const;
void setPatternTransform(const AffineTransform&);
virtual TextStream& externalRepresentation(TextStream&) const;
#if PLATFORM(CG)
virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const;
virtual void teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const;
#endif
#if PLATFORM(QT) || PLATFORM(CAIRO)
virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const;
#endif
private:
OwnPtr<ImageBuffer> m_tile;
const SVGPatternElement* m_ownerElement;
AffineTransform m_patternTransform;
FloatRect m_patternBoundaries;
bool m_boundingBoxMode;
#if PLATFORM(CG)
mutable CGColorSpaceRef m_patternSpace;
mutable CGPatternRef m_pattern;
#endif
};
}
#endif
#endif // SVGPaintServerPattern_h