1
+ // This Source Code Form is subject to the terms of the MIT License.
2
+ // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3
+ // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4
+ // All Rights Reserved.
5
+
6
+ using System . Windows . Shapes ;
7
+
8
+ namespace Wpf . Ui . Gallery . Effects ;
9
+
10
+ /// <summary>
11
+ /// Snowflake data model
12
+ /// </summary>
13
+ internal class SnowFlake
14
+ {
15
+ private Ellipse ? _shape ;
16
+ private double _x ;
17
+ private double _y ;
18
+ private double _size ;
19
+ private double _speed ;
20
+ private double _opacity ;
21
+ private double _velX ;
22
+ private double _velY ;
23
+ private double _stepSize ;
24
+ private double _step ;
25
+ private double _angle ;
26
+ private TranslateTransform ? _transform ;
27
+
28
+ /// <summary>
29
+ /// Gets or sets shape of the snowflake
30
+ /// </summary>
31
+ public Ellipse ? Shape
32
+ {
33
+ get => _shape ;
34
+ set => _shape = value ;
35
+ }
36
+
37
+ /// <summary>Gets or sets x position</summary>
38
+ public double X
39
+ {
40
+ get => _x ;
41
+ set => _x = value ;
42
+ }
43
+
44
+ /// <summary>Gets or sets Y position</summary>
45
+ public double Y
46
+ {
47
+ get => _y ;
48
+ set => _y = value ;
49
+ }
50
+
51
+ /// <summary>Gets or sets Size</summary>
52
+ public double Size
53
+ {
54
+ get => _size ;
55
+ set => _size = value ;
56
+ }
57
+
58
+ /// <summary>Gets or sets Falling speed</summary>
59
+ public double Speed
60
+ {
61
+ get => _speed ;
62
+ set => _speed = value ;
63
+ }
64
+
65
+ /// <summary>Gets or sets Opacity</summary>
66
+ public double Opacity
67
+ {
68
+ get => _opacity ;
69
+ set => _opacity = value ;
70
+ }
71
+
72
+ /// <summary>Gets or sets Horizontal velocity</summary>
73
+ public double VelX
74
+ {
75
+ get => _velX ;
76
+ set => _velX = value ;
77
+ }
78
+
79
+ /// <summary>Gets or sets Vertical velocity</summary>
80
+ public double VelY
81
+ {
82
+ get => _velY ;
83
+ set => _velY = value ;
84
+ }
85
+
86
+ /// <summary>Gets or sets Step size</summary>
87
+ public double StepSize
88
+ {
89
+ get => _stepSize ;
90
+ set => _stepSize = value ;
91
+ }
92
+
93
+ /// <summary>Gets or sets Step</summary>
94
+ public double Step
95
+ {
96
+ get => _step ;
97
+ set => _step = value ;
98
+ }
99
+
100
+ /// <summary>Gets or sets Angle</summary>
101
+ public double Angle
102
+ {
103
+ get => _angle ;
104
+ set => _angle = value ;
105
+ }
106
+
107
+ /// <summary>Gets or sets 2D coordinate transformation</summary>
108
+ public TranslateTransform ? Transform
109
+ {
110
+ get => _transform ;
111
+ set => _transform = value ;
112
+ }
113
+ }
0 commit comments