blob: fdc45f657a987d103c7fffd5fcc2595b68abe86a [file] [log] [blame]
fmalita6ceef3d2016-07-26 18:46:34 -07001/*
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
Florin Malitab3418102020-10-15 18:10:29 -04008#include "modules/svg/include/SkSVGAttribute.h"
fmalita6ceef3d2016-07-26 18:46:34 -07009
fmalita2d961e02016-08-11 09:16:29 -070010SkSVGPresentationAttributes SkSVGPresentationAttributes::MakeInitial() {
11 SkSVGPresentationAttributes result;
fmalita6ceef3d2016-07-26 18:46:34 -070012
fmalita2d961e02016-08-11 09:16:29 -070013 result.fFill.set(SkSVGPaint(SkSVGColorType(SK_ColorBLACK)));
14 result.fFillOpacity.set(SkSVGNumberType(1));
Florin Malitae932d4b2016-12-01 13:35:11 -050015 result.fFillRule.set(SkSVGFillRule(SkSVGFillRule::Type::kNonZero));
Florin Malita57a0edf2017-10-10 11:22:08 -040016 result.fClipRule.set(SkSVGFillRule(SkSVGFillRule::Type::kNonZero));
fmalita6ceef3d2016-07-26 18:46:34 -070017
fmalita2d961e02016-08-11 09:16:29 -070018 result.fStroke.set(SkSVGPaint(SkSVGPaint::Type::kNone));
Florin Malitaf543a602017-10-13 14:07:44 -040019 result.fStrokeDashArray.set(SkSVGDashArray(SkSVGDashArray::Type::kNone));
Florin Malitae1dadd72017-10-13 18:18:32 -040020 result.fStrokeDashOffset.set(SkSVGLength(0));
Tyler Denniston041f6652020-12-03 11:14:16 -050021 result.fStrokeLineCap.set(SkSVGLineCap::kButt);
fmalita2d961e02016-08-11 09:16:29 -070022 result.fStrokeLineJoin.set(SkSVGLineJoin(SkSVGLineJoin::Type::kMiter));
Florin Malita4de426b2017-10-09 12:57:41 -040023 result.fStrokeMiterLimit.set(SkSVGNumberType(4));
fmalita2d961e02016-08-11 09:16:29 -070024 result.fStrokeOpacity.set(SkSVGNumberType(1));
25 result.fStrokeWidth.set(SkSVGLength(1));
fmalita6ceef3d2016-07-26 18:46:34 -070026
Florin Malitaffe6ae42017-10-12 11:33:28 -040027 result.fVisibility.set(SkSVGVisibility(SkSVGVisibility::Type::kVisible));
28
Tyler Denniston6c8314e2020-04-09 14:14:10 -040029 result.fColor.set(SkSVGColorType(SK_ColorBLACK));
30
Florin Malita39fe8c82020-10-20 10:43:03 -040031 result.fFontFamily.init("Sans");
32 result.fFontStyle.init(SkSVGFontStyle::Type::kNormal);
33 result.fFontSize.init(SkSVGLength(24));
Florin Malita056385b2020-10-27 22:57:56 -040034 result.fFontWeight.init(SkSVGFontWeight::Type::kNormal);
35 result.fTextAnchor.init(SkSVGTextAnchor::Type::kStart);
Florin Malita39fe8c82020-10-20 10:43:03 -040036
fmalita2d961e02016-08-11 09:16:29 -070037 return result;
fmalita6ceef3d2016-07-26 18:46:34 -070038}