KHTML
SVGImage.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SVGImage_h
00027 #define SVGImage_h
00028
00029 #if ENABLE(SVG)
00030
00031 #include "Image.h"
00032 #include "ImageBuffer.h"
00033 #include "IntSize.h"
00034 #include <wtf/OwnPtr.h>
00035
00036 namespace WebCore {
00037
00038 class SVGDocument;
00039 class Frame;
00040 class FrameView;
00041 class Page;
00042
00043 class SVGImage : public Image {
00044 public:
00045 SVGImage(ImageObserver*);
00046 ~SVGImage();
00047
00048 virtual void setContainerSize(const IntSize&);
00049 virtual bool usesContainerSize() const;
00050 virtual bool hasRelativeWidth() const;
00051 virtual bool hasRelativeHeight() const;
00052
00053 virtual IntSize size() const;
00054
00055 virtual bool dataChanged(bool allDataReceived);
00056
00057 virtual NativeImagePtr frameAtIndex(size_t) { return 0; }
00058
00059 private:
00060 virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, CompositeOperator);
00061
00062 virtual NativeImagePtr nativeImageForCurrentFrame();
00063
00064 SVGDocument* m_document;
00065 OwnPtr<Page> m_page;
00066 RefPtr<Frame> m_frame;
00067 RefPtr<FrameView> m_frameView;
00068 IntSize m_minSize;
00069 OwnPtr<ImageBuffer> m_frameCache;
00070 };
00071 }
00072
00073 #endif // ENABLE(SVG)
00074
00075 #endif