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 "SkSVGRect.h" michael@0: #include "SkSVGParser.h" michael@0: michael@0: const SkSVGAttribute SkSVGRect::gAttributes[] = { michael@0: SVG_ATTRIBUTE(height), michael@0: SVG_ATTRIBUTE(width), michael@0: SVG_ATTRIBUTE(x), michael@0: SVG_ATTRIBUTE(y) michael@0: }; michael@0: michael@0: DEFINE_SVG_INFO(Rect) michael@0: michael@0: SkSVGRect::SkSVGRect() { michael@0: f_x.set("0"); michael@0: f_y.set("0"); michael@0: } michael@0: michael@0: void SkSVGRect::translate(SkSVGParser& parser, bool defState) { michael@0: parser._startElement("rect"); michael@0: INHERITED::translate(parser, defState); michael@0: SVG_ADD_ATTRIBUTE_ALIAS(left, x); michael@0: SVG_ADD_ATTRIBUTE_ALIAS(top, y); michael@0: SVG_ADD_ATTRIBUTE(width); michael@0: SVG_ADD_ATTRIBUTE(height); michael@0: parser._endElement(); michael@0: }