michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #include "SkSVGGroup.h" michael@0: #include "SkSVGParser.h" michael@0: michael@0: SkSVGGroup::SkSVGGroup() { michael@0: fIsNotDef = false; michael@0: } michael@0: michael@0: SkSVGElement* SkSVGGroup::getGradient() { michael@0: for (SkSVGElement** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) { michael@0: SkSVGElement* result = (*ptr)->getGradient(); michael@0: if (result != NULL) michael@0: return result; michael@0: } michael@0: return NULL; michael@0: } michael@0: michael@0: bool SkSVGGroup::isDef() { michael@0: return fParent ? fParent->isDef() : false; michael@0: } michael@0: michael@0: bool SkSVGGroup::isFlushable() { michael@0: return false; michael@0: } michael@0: michael@0: bool SkSVGGroup::isGroup() { michael@0: return true; michael@0: } michael@0: michael@0: bool SkSVGGroup::isNotDef() { michael@0: return fParent ? fParent->isNotDef() : false; michael@0: } michael@0: michael@0: void SkSVGGroup::translate(SkSVGParser& parser, bool defState) { michael@0: for (SkSVGElement** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) michael@0: parser.translate(*ptr, defState); michael@0: }