OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2006 The Android Open Source Project | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 | |
9 #include "SkSVGGroup.h" | |
10 #include "SkSVGParser.h" | |
11 | |
12 SkSVGGroup::SkSVGGroup() { | |
13 fIsNotDef = false; | |
14 } | |
15 | |
16 SkSVGElement* SkSVGGroup::getGradient() { | |
17 for (SkSVGElement** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) { | |
18 SkSVGElement* result = (*ptr)->getGradient(); | |
19 if (result != nullptr) | |
20 return result; | |
21 } | |
22 return nullptr; | |
23 } | |
24 | |
25 bool SkSVGGroup::isDef() { | |
26 return fParent ? fParent->isDef() : false; | |
27 } | |
28 | |
29 bool SkSVGGroup::isFlushable() { | |
30 return false; | |
31 } | |
32 | |
33 bool SkSVGGroup::isGroup() { | |
34 return true; | |
35 } | |
36 | |
37 bool SkSVGGroup::isNotDef() { | |
38 return fParent ? fParent->isNotDef() : false; | |
39 } | |
40 | |
41 void SkSVGGroup::translate(SkSVGParser& parser, bool defState) { | |
42 for (SkSVGElement** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) | |
43 parser.translate(*ptr, defState); | |
44 } | |
OLD | NEW |