figma_api/models/
texture_effect.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/// TextureEffect : A texture effect
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TextureEffect {
17    /// The size of the texture effect
18    #[serde(rename = "noiseSize")]
19    pub noise_size: f64,
20    /// The radius of the texture effect
21    #[serde(rename = "radius")]
22    pub radius: f64,
23    /// Whether the texture is clipped to the shape
24    #[serde(rename = "clipToShape")]
25    pub clip_to_shape: bool,
26}
27
28impl TextureEffect {
29    /// A texture effect
30    pub fn new(noise_size: f64, radius: f64, clip_to_shape: bool) -> TextureEffect {
31        TextureEffect {
32            noise_size,
33            radius,
34            clip_to_shape,
35        }
36    }
37}
38