figma_api/models/stroke_weights.rs
1/*
2 * Figma API
3 *
4 * 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).
5 *
6 * The version of the OpenAPI document: 0.31.0
7 * Contact: support@figma.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// StrokeWeights : Individual stroke weights
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct StrokeWeights {
17 /// The top stroke weight.
18 #[serde(rename = "top")]
19 pub top: f64,
20 /// The right stroke weight.
21 #[serde(rename = "right")]
22 pub right: f64,
23 /// The bottom stroke weight.
24 #[serde(rename = "bottom")]
25 pub bottom: f64,
26 /// The left stroke weight.
27 #[serde(rename = "left")]
28 pub left: f64,
29}
30
31impl StrokeWeights {
32 /// Individual stroke weights
33 pub fn new(top: f64, right: f64, bottom: f64, left: f64) -> StrokeWeights {
34 StrokeWeights {
35 top,
36 right,
37 bottom,
38 left,
39 }
40 }
41}
42