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