aboutsummaryrefslogtreecommitdiffhomepage
path: root/libs/graphics/svg/SkSVGGroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/graphics/svg/SkSVGGroup.cpp')
-rw-r--r--libs/graphics/svg/SkSVGGroup.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/libs/graphics/svg/SkSVGGroup.cpp b/libs/graphics/svg/SkSVGGroup.cpp
new file mode 100644
index 0000000000..a72dd8af6b
--- /dev/null
+++ b/libs/graphics/svg/SkSVGGroup.cpp
@@ -0,0 +1,36 @@
+#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 != nil)
+ return result;
+ }
+ return nil;
+}
+
+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);
+}