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" 9 MakeInitial()10SkSVGPresentationAttributes SkSVGPresentationAttributes::MakeInitial() { 11 SkSVGPresentationAttributes result; 12 13 result.fFill.set(SkSVGPaint(SkSVGColorType(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(SkSVGLineCap::Type::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 return result; 30 } 31