blob: 31c6c28bb2509c68abf9f853cec1e21738bcab92 [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
8#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));
fmalita2d961e02016-08-11 09:16:29 -070021 result.fStrokeLineCap.set(SkSVGLineCap(SkSVGLineCap::Type::kButt));
22 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
fmalita2d961e02016-08-11 09:16:29 -070029 return result;
fmalita6ceef3d2016-07-26 18:46:34 -070030}