Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / modules / svg / src / SkSVGAttribute.cpp
1 /*
2  * Copyright 2016 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7
8 #include "modules/svg/include/SkSVGAttribute.h"
9
10 SkSVGPresentationAttributes SkSVGPresentationAttributes::MakeInitial() {
11     SkSVGPresentationAttributes result;
12
13     result.fFill.set(SkSVGPaint(SkSVGColor(SK_ColorBLACK)));
14     result.fFillOpacity.set(SkSVGNumberType(1));
15     result.fFillRule.set(SkSVGFillRule(SkSVGFillRule::Type::kNonZero));
16     result.fClipRule.set(SkSVGFillRule(SkSVGFillRule::Type::kNonZero));
17
18     result.fStroke.set(SkSVGPaint(SkSVGPaint::Type::kNone));
19     result.fStrokeDashArray.set(SkSVGDashArray(SkSVGDashArray::Type::kNone));
20     result.fStrokeDashOffset.set(SkSVGLength(0));
21     result.fStrokeLineCap.set(SkSVGLineCap::kButt);
22     result.fStrokeLineJoin.set(SkSVGLineJoin(SkSVGLineJoin::Type::kMiter));
23     result.fStrokeMiterLimit.set(SkSVGNumberType(4));
24     result.fStrokeOpacity.set(SkSVGNumberType(1));
25     result.fStrokeWidth.set(SkSVGLength(1));
26
27     result.fVisibility.set(SkSVGVisibility(SkSVGVisibility::Type::kVisible));
28
29     result.fColor.set(SkSVGColorType(SK_ColorBLACK));
30     result.fColorInterpolation.set(SkSVGColorspace::kSRGB);
31     result.fColorInterpolationFilters.set(SkSVGColorspace::kLinearRGB);
32
33     result.fFontFamily.init("Sans");
34     result.fFontStyle.init(SkSVGFontStyle::Type::kNormal);
35     result.fFontSize.init(SkSVGLength(24));
36     result.fFontWeight.init(SkSVGFontWeight::Type::kNormal);
37     result.fTextAnchor.init(SkSVGTextAnchor::Type::kStart);
38
39     result.fDisplay.init(SkSVGDisplay::kInline);
40
41     result.fStopColor.set(SkSVGColor(SK_ColorBLACK));
42     result.fStopOpacity.set(SkSVGNumberType(1));
43     result.fFloodColor.set(SkSVGColor(SK_ColorBLACK));
44     result.fFloodOpacity.set(SkSVGNumberType(1));
45     result.fLightingColor.set(SkSVGColor(SK_ColorWHITE));
46
47     return result;
48 }