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
/*
* Figma API
*
* This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api). Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues).
*
* The version of the OpenAPI document: 0.31.0
* Contact: support@figma.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MinimalStrokesTrait {
/// An array of stroke paints applied to the node.
#[serde(rename = "strokes", skip_serializing_if = "Option::is_none")]
pub strokes: Option<Vec<models::Paint>>,
/// The weight of strokes on the node.
#[serde(rename = "strokeWeight", skip_serializing_if = "Option::is_none")]
pub stroke_weight: Option<f64>,
/// Position of stroke relative to vector outline, as a string enum - `INSIDE`: stroke drawn inside the shape boundary - `OUTSIDE`: stroke drawn outside the shape boundary - `CENTER`: stroke drawn centered along the shape boundary
#[serde(rename = "strokeAlign", skip_serializing_if = "Option::is_none")]
pub stroke_align: Option<StrokeAlign>,
/// A string enum with value of \"MITER\", \"BEVEL\", or \"ROUND\", describing how corners in vector paths are rendered.
#[serde(rename = "strokeJoin", skip_serializing_if = "Option::is_none")]
pub stroke_join: Option<StrokeJoin>,
/// An array of floating point numbers describing the pattern of dash length and gap lengths that the vector stroke will use when drawn. For example a value of [1, 2] indicates that the stroke will be drawn with a dash of length 1 followed by a gap of length 2, repeated.
#[serde(rename = "strokeDashes", skip_serializing_if = "Option::is_none")]
pub stroke_dashes: Option<Vec<f64>>,
}
impl MinimalStrokesTrait {
pub fn new() -> MinimalStrokesTrait {
MinimalStrokesTrait {
strokes: None,
stroke_weight: None,
stroke_align: None,
stroke_join: None,
stroke_dashes: None,
}
}
}
/// Position of stroke relative to vector outline, as a string enum - `INSIDE`: stroke drawn inside the shape boundary - `OUTSIDE`: stroke drawn outside the shape boundary - `CENTER`: stroke drawn centered along the shape boundary
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StrokeAlign {
#[serde(rename = "INSIDE")]
Inside,
#[serde(rename = "OUTSIDE")]
Outside,
#[serde(rename = "CENTER")]
Center,
}
impl Default for StrokeAlign {
fn default() -> StrokeAlign {
Self::Inside
}
}
/// A string enum with value of \"MITER\", \"BEVEL\", or \"ROUND\", describing how corners in vector paths are rendered.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StrokeJoin {
#[serde(rename = "MITER")]
Miter,
#[serde(rename = "BEVEL")]
Bevel,
#[serde(rename = "ROUND")]
Round,
}
impl Default for StrokeJoin {
fn default() -> StrokeJoin {
Self::Miter
}
}