summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/visualize/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/visualize/path.rs')
-rw-r--r--crates/typst-library/src/visualize/path.rs20
1 files changed, 4 insertions, 16 deletions
diff --git a/crates/typst-library/src/visualize/path.rs b/crates/typst-library/src/visualize/path.rs
index e19e091d..bd8aea02 100644
--- a/crates/typst-library/src/visualize/path.rs
+++ b/crates/typst-library/src/visualize/path.rs
@@ -1,11 +1,7 @@
use self::PathVertex::{AllControlPoints, MirroredControlPoint, Vertex};
-use crate::diag::{bail, SourceResult};
-use crate::engine::Engine;
-use crate::foundations::{
- array, cast, elem, Array, Content, NativeElement, Packed, Reflect, Show, Smart,
- StyleChain,
-};
-use crate::layout::{Axes, BlockElem, Length, Rel};
+use crate::diag::bail;
+use crate::foundations::{array, cast, elem, Array, Reflect, Smart};
+use crate::layout::{Axes, Length, Rel};
use crate::visualize::{FillRule, Paint, Stroke};
/// A path through a list of points, connected by Bézier curves.
@@ -21,7 +17,7 @@ use crate::visualize::{FillRule, Paint, Stroke};
/// ((50%, 0pt), (40pt, 0pt)),
/// )
/// ```
-#[elem(Show)]
+#[elem]
pub struct PathElem {
/// How to fill the path.
///
@@ -83,14 +79,6 @@ pub struct PathElem {
pub vertices: Vec<PathVertex>,
}
-impl Show for Packed<PathElem> {
- fn show(&self, engine: &mut Engine, _: StyleChain) -> SourceResult<Content> {
- Ok(BlockElem::single_layouter(self.clone(), engine.routines.layout_path)
- .pack()
- .spanned(self.span()))
- }
-}
-
/// A component used for path creation.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum PathVertex {