gfx/skia/trunk/src/svg/SkSVGRect.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/svg/SkSVGRect.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2006 The Android Open Source Project
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +
    1.13 +#include "SkSVGRect.h"
    1.14 +#include "SkSVGParser.h"
    1.15 +
    1.16 +const SkSVGAttribute SkSVGRect::gAttributes[] = {
    1.17 +    SVG_ATTRIBUTE(height),
    1.18 +    SVG_ATTRIBUTE(width),
    1.19 +    SVG_ATTRIBUTE(x),
    1.20 +    SVG_ATTRIBUTE(y)
    1.21 +};
    1.22 +
    1.23 +DEFINE_SVG_INFO(Rect)
    1.24 +
    1.25 +SkSVGRect::SkSVGRect() {
    1.26 +    f_x.set("0");
    1.27 +    f_y.set("0");
    1.28 +}
    1.29 +
    1.30 +void SkSVGRect::translate(SkSVGParser& parser, bool defState) {
    1.31 +    parser._startElement("rect");
    1.32 +    INHERITED::translate(parser, defState);
    1.33 +    SVG_ADD_ATTRIBUTE_ALIAS(left, x);
    1.34 +    SVG_ADD_ATTRIBUTE_ALIAS(top, y);
    1.35 +    SVG_ADD_ATTRIBUTE(width);
    1.36 +    SVG_ADD_ATTRIBUTE(height);
    1.37 +    parser._endElement();
    1.38 +}

mercurial