figma_api/models/
corner_trait.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CornerTrait {
16    /// Radius of each corner if a single radius is set for all corners
17    #[serde(rename = "cornerRadius", skip_serializing_if = "Option::is_none")]
18    pub corner_radius: Option<f64>,
19    /// A value that lets you control how \"smooth\" the corners are. Ranges from 0 to 1. 0 is the default and means that the corner is perfectly circular. A value of 0.6 means the corner matches the iOS 7 \"squircle\" icon shape. Other values produce various other curves.
20    #[serde(rename = "cornerSmoothing", skip_serializing_if = "Option::is_none")]
21    pub corner_smoothing: Option<f64>,
22    /// Array of length 4 of the radius of each corner of the frame, starting in the top left and proceeding clockwise.  Values are given in the order top-left, top-right, bottom-right, bottom-left.
23    #[serde(rename = "rectangleCornerRadii", skip_serializing_if = "Option::is_none")]
24    pub rectangle_corner_radii: Option<Vec<f64>>,
25}
26
27impl CornerTrait {
28    pub fn new() -> CornerTrait {
29        CornerTrait {
30            corner_radius: None,
31            corner_smoothing: None,
32            rectangle_corner_radii: None,
33        }
34    }
35}
36