figma_api/models/
easing_easing_function_cubic_bezier.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/// EasingEasingFunctionCubicBezier : A cubic bezier curve that defines the easing.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EasingEasingFunctionCubicBezier {
17    /// The x component of the first control point.
18    #[serde(rename = "x1")]
19    pub x1: f64,
20    /// The y component of the first control point.
21    #[serde(rename = "y1")]
22    pub y1: f64,
23    /// The x component of the second control point.
24    #[serde(rename = "x2")]
25    pub x2: f64,
26    /// The y component of the second control point.
27    #[serde(rename = "y2")]
28    pub y2: f64,
29}
30
31impl EasingEasingFunctionCubicBezier {
32    /// A cubic bezier curve that defines the easing.
33    pub fn new(x1: f64, y1: f64, x2: f64, y2: f64) -> EasingEasingFunctionCubicBezier {
34        EasingEasingFunctionCubicBezier {
35            x1,
36            y1,
37            x2,
38            y2,
39        }
40    }
41}
42