@@ -80,22 +80,17 @@ impl Default for Stroke {
80
80
}
81
81
82
82
/// Draws at the beginning and end of an open path contour.
83
- #[ derive( Copy , Clone , PartialEq , Debug ) ]
83
+ #[ derive( Copy , Clone , Default , PartialEq , Debug ) ]
84
84
pub enum LineCap {
85
85
/// No stroke extension.
86
+ #[ default]
86
87
Butt ,
87
88
/// Adds circle.
88
89
Round ,
89
90
/// Adds square.
90
91
Square ,
91
92
}
92
93
93
- impl Default for LineCap {
94
- fn default ( ) -> Self {
95
- LineCap :: Butt
96
- }
97
- }
98
-
99
94
/// Specifies how corners are drawn when a shape is stroked.
100
95
///
101
96
/// Join affects the four corners of a stroked rectangle, and the connected segments in a
@@ -108,9 +103,10 @@ impl Default for LineCap {
108
103
/// The fill path constructed to describe the stroked path respects the join setting but may
109
104
/// not contain the actual join. For instance, a fill path constructed with round joins does
110
105
/// not necessarily include circles at each connected segment.
111
- #[ derive( Copy , Clone , PartialEq , Debug ) ]
106
+ #[ derive( Copy , Clone , Default , PartialEq , Debug ) ]
112
107
pub enum LineJoin {
113
108
/// Extends to miter limit, then switches to bevel.
109
+ #[ default]
114
110
Miter ,
115
111
/// Extends to miter limit, then clips the corner.
116
112
MiterClip ,
@@ -120,12 +116,6 @@ pub enum LineJoin {
120
116
Bevel ,
121
117
}
122
118
123
- impl Default for LineJoin {
124
- fn default ( ) -> Self {
125
- LineJoin :: Miter
126
- }
127
- }
128
-
129
119
const QUAD_RECURSIVE_LIMIT : usize = 3 ;
130
120
131
121
// quads with extreme widths (e.g. (0,1) (1,6) (0,3) width=5e7) recurse to point of failure
0 commit comments