velato/schema/shapes/
offset_path.rs

1// Copyright 2024 the Velato Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4use crate::schema::shapes::FloatValue;
5use crate::schema::{constants::line_join::LineJoin, shapes::modifier::ModifierShape};
6use serde::{Deserialize, Serialize};
7
8/// Interpolates the shape with its center point and bezier tangents with the
9/// opposite direction
10#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
11pub struct OffsetPathShape {
12    #[serde(flatten)]
13    pub modifier: ModifierShape,
14
15    #[serde(rename = "a")]
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub amount: Option<FloatValue>,
18
19    #[serde(rename = "lj")]
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub line_join: Option<LineJoin>, // default  2
22
23    #[serde(rename = "ml")]
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub miter_limit: Option<FloatValue>,
26}