fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame] | 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 "SkSVGAttribute.h" |
fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame] | 9 | |
fmalita | 2d961e0 | 2016-08-11 09:16:29 -0700 | [diff] [blame] | 10 | SkSVGPresentationAttributes SkSVGPresentationAttributes::MakeInitial() { |
| 11 | SkSVGPresentationAttributes result; |
fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame] | 12 | |
fmalita | 2d961e0 | 2016-08-11 09:16:29 -0700 | [diff] [blame] | 13 | result.fFill.set(SkSVGPaint(SkSVGColorType(SK_ColorBLACK))); |
| 14 | result.fFillOpacity.set(SkSVGNumberType(1)); |
Florin Malita | e932d4b | 2016-12-01 13:35:11 -0500 | [diff] [blame] | 15 | result.fFillRule.set(SkSVGFillRule(SkSVGFillRule::Type::kNonZero)); |
Florin Malita | 57a0edf | 2017-10-10 11:22:08 -0400 | [diff] [blame] | 16 | result.fClipRule.set(SkSVGFillRule(SkSVGFillRule::Type::kNonZero)); |
fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame] | 17 | |
fmalita | 2d961e0 | 2016-08-11 09:16:29 -0700 | [diff] [blame] | 18 | result.fStroke.set(SkSVGPaint(SkSVGPaint::Type::kNone)); |
Florin Malita | f543a60 | 2017-10-13 14:07:44 -0400 | [diff] [blame] | 19 | result.fStrokeDashArray.set(SkSVGDashArray(SkSVGDashArray::Type::kNone)); |
Florin Malita | e1dadd7 | 2017-10-13 18:18:32 -0400 | [diff] [blame] | 20 | result.fStrokeDashOffset.set(SkSVGLength(0)); |
fmalita | 2d961e0 | 2016-08-11 09:16:29 -0700 | [diff] [blame] | 21 | result.fStrokeLineCap.set(SkSVGLineCap(SkSVGLineCap::Type::kButt)); |
| 22 | result.fStrokeLineJoin.set(SkSVGLineJoin(SkSVGLineJoin::Type::kMiter)); |
Florin Malita | 4de426b | 2017-10-09 12:57:41 -0400 | [diff] [blame] | 23 | result.fStrokeMiterLimit.set(SkSVGNumberType(4)); |
fmalita | 2d961e0 | 2016-08-11 09:16:29 -0700 | [diff] [blame] | 24 | result.fStrokeOpacity.set(SkSVGNumberType(1)); |
| 25 | result.fStrokeWidth.set(SkSVGLength(1)); |
fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame] | 26 | |
Florin Malita | ffe6ae4 | 2017-10-12 11:33:28 -0400 | [diff] [blame] | 27 | result.fVisibility.set(SkSVGVisibility(SkSVGVisibility::Type::kVisible)); |
| 28 | |
fmalita | 2d961e0 | 2016-08-11 09:16:29 -0700 | [diff] [blame] | 29 | return result; |
fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame] | 30 | } |