summaryrefslogtreecommitdiff
path: root/src/library/deco.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/deco.rs')
-rw-r--r--src/library/deco.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/library/deco.rs b/src/library/deco.rs
index 3e91d1de..ccb657d1 100644
--- a/src/library/deco.rs
+++ b/src/library/deco.rs
@@ -38,6 +38,18 @@ pub struct Decoration {
pub extent: Linear,
}
+impl From<DecoLine> for Decoration {
+ fn from(line: DecoLine) -> Self {
+ Self {
+ line,
+ stroke: None,
+ thickness: None,
+ offset: None,
+ extent: Linear::zero(),
+ }
+ }
+}
+
/// The kind of decorative line.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum DecoLine {
@@ -49,7 +61,7 @@ pub enum DecoLine {
Overline,
}
-/// Differents kinds of decorative lines for text.
+/// Different kinds of decorative lines for text.
pub trait LineKind {
const LINE: DecoLine;
}