1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//! Stroke properties for shapes in the Grafo library.
//!
//! This module defines the `Stroke` struct, which represents the stroke properties of a shape.
//!
//! # Examples
//!
//! Creating and using stroke properties:
///
/// ```
/// use grafo::Color;
/// use grafo::Stroke;
///
/// // Create a red stroke with a width of 2.0
/// let red_stroke = Stroke::new(2.0, Color::rgb(255, 0, 0));
///
/// // Create a transparent stroke using default values
/// let transparent_stroke = Stroke::default();
///
/// // Check if a stroke is empty
/// assert!(!red_stroke.is_empty());
/// assert!(transparent_stroke.is_empty());
/// ```
use crateColor;
/// Represents the stroke properties of a shape.
///
/// The `Stroke` struct allows you to define the visual outline of shapes with specific width and color.
///
/// # Examples
///
/// ```
/// use grafo::Color;
/// use grafo::Stroke;
///
/// // Create a blue stroke with a width of 1.5
/// let blue_stroke = Stroke::new(1.5, Color::rgb(0, 0, 255));
///
/// // Check if the stroke is empty
/// assert!(!blue_stroke.is_empty());
///
/// // Create a stroke with zero width
/// let no_stroke = Stroke::new(0.0, Color::rgb(0, 0, 0));
/// assert!(no_stroke.is_empty());
/// ```