~ubuntu-branches/ubuntu/maverick/webkit/maverick

« back to all changes in this revision

Viewing changes to WebCore/ksvg2/svg/SVGMaskElement.h

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey
  • Date: 2007-08-19 15:54:12 UTC
  • Revision ID: james.westby@ubuntu.com-20070819155412-uxxg1h9plpghmtbi
Tags: upstream-0~svn25144
ImportĀ upstreamĀ versionĀ 0~svn25144

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2005 Alexander Kellett <lypanov@kde.org>
 
3
 
 
4
    This file is part of the KDE project
 
5
 
 
6
    This library is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU Library General Public
 
8
    License as published by the Free Software Foundation; either
 
9
    version 2 of the License, or (at your option) any later version.
 
10
 
 
11
    This library is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
    Library General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU Library General Public License
 
17
    along with this library; see the file COPYING.LIB.  If not, write to
 
18
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
19
    Boston, MA 02111-1307, USA.
 
20
*/
 
21
 
 
22
#ifndef SVGMaskElement_h
 
23
#define SVGMaskElement_h
 
24
 
 
25
#if ENABLE(SVG)
 
26
 
 
27
#include "SVGResourceMasker.h"
 
28
#include "SVGExternalResourcesRequired.h"
 
29
#include "SVGLangSpace.h"
 
30
#include "SVGStyledLocatableElement.h"
 
31
#include "SVGTests.h"
 
32
#include "SVGURIReference.h"
 
33
 
 
34
namespace WebCore
 
35
{
 
36
    class Attribute;
 
37
    class SVGLength;
 
38
    class SVGMaskElement : public SVGStyledLocatableElement,
 
39
                           public SVGURIReference,
 
40
                           public SVGTests,
 
41
                           public SVGLangSpace,
 
42
                           public SVGExternalResourcesRequired
 
43
    {
 
44
    public:
 
45
        SVGMaskElement(const QualifiedName&, Document*);
 
46
        virtual ~SVGMaskElement();
 
47
        virtual bool isValid() const { return SVGTests::isValid(); }
 
48
 
 
49
        // 'SVGMaskElement' functions
 
50
        virtual void parseMappedAttribute(MappedAttribute*);
 
51
        virtual void notifyAttributeChange() const;
 
52
 
 
53
        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
54
        virtual SVGResource* canvasResource();
 
55
 
 
56
    protected:
 
57
        std::auto_ptr<ImageBuffer> drawMaskerContent();
 
58
 
 
59
        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
 
60
        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
 
61
 
 
62
        ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, X, x)
 
63
        ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Y, y)
 
64
        ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Width, width)
 
65
        ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Height, height)
 
66
 
 
67
        virtual const SVGElement* contextElement() const { return this; }
 
68
 
 
69
    private:
 
70
        RefPtr<SVGResourceMasker> m_masker;
 
71
        mutable bool m_dirty;
 
72
    };
 
73
 
 
74
} // namespace WebCore
 
75
 
 
76
#endif // ENABLE(SVG)
 
77
#endif
 
78
 
 
79
// vim:ts=4:noet