Flutter Engine
The Flutter Engine
third_party
skia
modules
svg
src
SkSVGAttribute.cpp
Go to the documentation of this file.
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 "
modules/svg/include/SkSVGAttribute.h
"
9
10
SkSVGPresentationAttributes
SkSVGPresentationAttributes::MakeInitial
() {
11
SkSVGPresentationAttributes
result
;
12
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
));
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::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
result
.fColor.set(
SkSVGColorType
(
SK_ColorBLACK
));
30
result
.fColorInterpolation.set(
SkSVGColorspace::kSRGB
);
31
result
.fColorInterpolationFilters.set(
SkSVGColorspace::kLinearRGB
);
32
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
);
38
39
result
.fDisplay.init(
SkSVGDisplay::kInline
);
40
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
));
46
47
return
result
;
48
}
SK_ColorBLACK
constexpr SkColor SK_ColorBLACK
Definition:
SkColor.h:103
SK_ColorWHITE
constexpr SkColor SK_ColorWHITE
Definition:
SkColor.h:122
SkSVGAttribute.h
SkSVGDisplay::kInline
@ kInline
SkSVGLineCap::kButt
@ kButt
SkSVGColorType
SkColor SkSVGColorType
Definition:
SkSVGTypes.h:25
SkSVGColorspace::kSRGB
@ kSRGB
SkSVGColorspace::kLinearRGB
@ kLinearRGB
SkSVGNumberType
SkScalar SkSVGNumberType
Definition:
SkSVGTypes.h:27
SkSVGColor
Definition:
SkSVGTypes.h:177
SkSVGDashArray
Definition:
SkSVGTypes.h:394
SkSVGDashArray::Type::kNone
@ kNone
SkSVGFillRule
Definition:
SkSVGTypes.h:342
SkSVGFillRule::Type::kNonZero
@ kNonZero
SkSVGFontStyle::Type::kNormal
@ kNormal
SkSVGFontWeight::Type::kNormal
@ kNormal
SkSVGLength
Definition:
SkSVGTypes.h:116
SkSVGLineJoin
Definition:
SkSVGTypes.h:294
SkSVGLineJoin::Type::kMiter
@ kMiter
SkSVGPaint
Definition:
SkSVGTypes.h:224
SkSVGPaint::Type::kNone
@ kNone
SkSVGTextAnchor::Type::kStart
@ kStart
SkSVGVisibility
Definition:
SkSVGTypes.h:370
SkSVGVisibility::Type::kVisible
@ kVisible
result
GAsyncResult * result
Definition:
fl_text_input_plugin.cc:106
SkSVGPresentationAttributes
Definition:
SkSVGAttribute.h:69
SkSVGPresentationAttributes::MakeInitial
static SkSVGPresentationAttributes MakeInitial()
Definition:
SkSVGAttribute.cpp:10
Generated on Sun Jun 23 2024 21:56:08 for Flutter Engine by
1.9.4