summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorEric Biedert <github@ericbiedert.de>2023-10-30 22:24:39 +0100
committerGitHub <noreply@github.com>2023-10-30 22:24:39 +0100
commit64d3fd8a3fc784d658b6670fce19f08c01a4363c (patch)
tree68e40b050569d4a1e50b5108a0c73f33e6fd9717 /crates
parent995fc40363252a5dbf4b19b15b847b5ab23fc739 (diff)
Add missing gradient to stroke cast (#2527)
Diffstat (limited to 'crates')
-rw-r--r--crates/typst/src/geom/stroke.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/typst/src/geom/stroke.rs b/crates/typst/src/geom/stroke.rs
index e88d887d..5fb64c90 100644
--- a/crates/typst/src/geom/stroke.rs
+++ b/crates/typst/src/geom/stroke.rs
@@ -262,6 +262,10 @@ cast! {
paint: Smart::Custom(color.into()),
..Default::default()
},
+ gradient: Gradient => Self {
+ paint: Smart::Custom(gradient.into()),
+ ..Default::default()
+ },
mut dict: Dict => {
fn take<T: FromValue>(dict: &mut Dict, key: &str) -> StrResult<Smart<T>> {
Ok(dict.take(key).ok().map(T::from_value)