2 * Copyright 2016 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #include "modules/svg/include/SkSVGAttribute.h"
10 SkSVGPresentationAttributes SkSVGPresentationAttributes::MakeInitial() {
11 SkSVGPresentationAttributes result;
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));
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));
27 result.fVisibility.set(SkSVGVisibility(SkSVGVisibility::Type::kVisible));
29 result.fColor.set(SkSVGColorType(SK_ColorBLACK));
30 result.fColorInterpolation.set(SkSVGColorspace::kSRGB);
31 result.fColorInterpolationFilters.set(SkSVGColorspace::kLinearRGB);
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);
39 result.fDisplay.init(SkSVGDisplay::kInline);
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));