Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: src/svg/SkSVGElements.h

Issue 884713007: Move SVG parser files under {include,src}/svg/parser/ (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/svg/SkSVGDefs.cpp ('k') | src/svg/SkSVGElements.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2006 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9
10 #ifndef SkSVGElements_DEFINED
11 #define SkSVGElements_DEFINED
12
13 #include "SkSVGPaintState.h"
14 #include "SkSVGTypes.h"
15 #include "SkTDArray.h"
16
17 class SkSVGParser;
18
19 #define DECLARE_SVG_INFO(_type) \
20 public: \
21 virtual ~SkSVG##_type(); \
22 static const SkSVGAttribute gAttributes[]; \
23 virtual int getAttributes(const SkSVGAttribute** attrPtr); \
24 virtual SkSVGTypes getType() const; \
25 virtual void translate(SkSVGParser& parser, bool defState); \
26 typedef SkSVG##_type BASE_CLASS
27
28 #define DEFINE_SVG_INFO(_type) \
29 SkSVG##_type::~SkSVG##_type() {} \
30 int SkSVG##_type::getAttributes(const SkSVGAttribute** attrPtr) { \
31 *attrPtr = gAttributes; \
32 return SK_ARRAY_COUNT(gAttributes); \
33 } \
34 SkSVGTypes SkSVG##_type::getType() const { return SkSVGType_##_type; }
35
36 #define DEFINE_SVG_NO_INFO(_type) \
37 SkSVG##_type::~SkSVG##_type() {} \
38 int SkSVG##_type::getAttributes(const SkSVGAttribute** ) { return 0; } \
39 SkSVGTypes SkSVG##_type::getType() const { return SkSVGType_##_type; }
40
41
42 struct SkSVGTypeName {
43 const char* fName;
44 SkSVGTypes fType;
45 };
46
47 class SkSVGElement : public SkSVGBase {
48 public:
49 SkSVGElement();
50 virtual ~SkSVGElement();
51 virtual SkSVGElement* getGradient();
52 virtual SkSVGTypes getType() const = 0;
53 virtual bool isDef();
54 virtual bool isFlushable();
55 virtual bool isGroup();
56 virtual bool isNotDef();
57 virtual bool onEndElement(SkSVGParser& parser);
58 virtual bool onStartElement(SkSVGElement* child);
59 void setIsDef();
60 // void setIsNotDef();
61 virtual void translate(SkSVGParser& parser, bool defState);
62 virtual void write(SkSVGParser& , SkString& color);
63 SkString f_id;
64 SkSVGPaint fPaintState;
65 SkTDArray<SkSVGElement*> fChildren;
66 SkSVGElement* fParent;
67 bool fIsDef;
68 bool fIsNotDef;
69 private:
70 bool isGroupParent();
71 };
72
73 #endif // SkSVGElements_DEFINED
OLDNEW
« no previous file with comments | « src/svg/SkSVGDefs.cpp ('k') | src/svg/SkSVGElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698