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
/*
* 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 ConnectorTextBackground {
/// Radius of each corner if a single radius is set for all corners
#[serde(rename = "cornerRadius", skip_serializing_if = "Option::is_none")]
pub corner_radius: Option<f64>,
/// 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.
#[serde(rename = "cornerSmoothing", skip_serializing_if = "Option::is_none")]
pub corner_smoothing: Option<f64>,
/// 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.
#[serde(rename = "rectangleCornerRadii", skip_serializing_if = "Option::is_none")]
pub rectangle_corner_radii: Option<Vec<f64>>,
/// An array of fill paints applied to the node.
#[serde(rename = "fills")]
pub fills: Vec<models::Paint>,
/// A mapping of a StyleType to style ID (see Style) of styles present on this node. The style ID can be used to look up more information about the style in the top-level styles field.
#[serde(rename = "styles", skip_serializing_if = "Option::is_none")]
pub styles: Option<std::collections::HashMap<String, String>>,
}
impl ConnectorTextBackground {
pub fn new(fills: Vec<models::Paint>) -> ConnectorTextBackground {
ConnectorTextBackground {
corner_radius: None,
corner_smoothing: None,
rectangle_corner_radii: None,
fills,
styles: None,
}
}
}