figma_api/models/arc_data.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/// ArcData : Information about the arc properties of an ellipse. 0° is the x axis and increasing angles rotate clockwise.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ArcData {
17 /// Start of the sweep in radians.
18 #[serde(rename = "startingAngle")]
19 pub starting_angle: f64,
20 /// End of the sweep in radians.
21 #[serde(rename = "endingAngle")]
22 pub ending_angle: f64,
23 /// Inner radius value between 0 and 1
24 #[serde(rename = "innerRadius")]
25 pub inner_radius: f64,
26}
27
28impl ArcData {
29 /// Information about the arc properties of an ellipse. 0° is the x axis and increasing angles rotate clockwise.
30 pub fn new(starting_angle: f64, ending_angle: f64, inner_radius: f64) -> ArcData {
31 ArcData {
32 starting_angle,
33 ending_angle,
34 inner_radius,
35 }
36 }
37}
38