pub struct CanvasNode {Show 20 fields
pub id: String,
pub name: String,
pub visible: Option<bool>,
pub locked: Option<bool>,
pub is_fixed: Option<bool>,
pub scroll_behavior: ScrollBehavior,
pub rotation: Option<f64>,
pub component_property_references: Option<HashMap<String, String>>,
pub plugin_data: Option<Option<Value>>,
pub shared_plugin_data: Option<Option<Value>>,
pub bound_variables: Option<Box<IsLayerTraitBoundVariables>>,
pub explicit_variable_modes: Option<HashMap<String, String>>,
pub export_settings: Option<Vec<ExportSetting>>,
pub children: Vec<SubcanvasNode>,
pub background_color: Box<Rgba>,
pub prototype_start_node_id: Option<String>,
pub flow_starting_points: Vec<FlowStartingPoint>,
pub prototype_device: Box<PrototypeDevice>,
pub prototype_backgrounds: Option<Vec<Rgba>>,
pub measurements: Option<Vec<Measurement>>,
}
Fields§
§id: String
A string uniquely identifying this node within the document.
name: String
The name given to the node by the user in the tool.
visible: Option<bool>
Whether or not the node is visible on the canvas.
locked: Option<bool>
If true, layer is locked and cannot be edited
is_fixed: Option<bool>
Whether the layer is fixed while the parent is scrolling
scroll_behavior: ScrollBehavior
How layer should be treated when the frame is resized
rotation: Option<f64>
The rotation of the node, if not 0.
component_property_references: Option<HashMap<String, String>>
A mapping of a layer’s property to component property name of component properties attached to this node. The component property name can be used to look up more information on the corresponding component’s or component set’s componentPropertyDefinitions.
plugin_data: Option<Option<Value>>
§bound_variables: Option<Box<IsLayerTraitBoundVariables>>
§explicit_variable_modes: Option<HashMap<String, String>>
A mapping of variable collection ID to mode ID representing the explicitly set modes for this node.
export_settings: Option<Vec<ExportSetting>>
An array of export settings representing images to export from the node.
children: Vec<SubcanvasNode>
§background_color: Box<Rgba>
Background color of the canvas.
prototype_start_node_id: Option<String>
Node ID that corresponds to the start frame for prototypes. This is deprecated with the introduction of multiple flows. Please use the flowStartingPoints
field.
flow_starting_points: Vec<FlowStartingPoint>
An array of flow starting points sorted by its position in the prototype settings panel.
prototype_device: Box<PrototypeDevice>
The device used to view a prototype.
prototype_backgrounds: Option<Vec<Rgba>>
The background color of the prototype (currently only supports a single solid color paint).
measurements: Option<Vec<Measurement>>
Implementations§
Source§impl CanvasNode
impl CanvasNode
pub fn new( id: String, name: String, scroll_behavior: ScrollBehavior, children: Vec<SubcanvasNode>, background_color: Rgba, prototype_start_node_id: Option<String>, flow_starting_points: Vec<FlowStartingPoint>, prototype_device: PrototypeDevice, ) -> CanvasNode
Trait Implementations§
Source§impl Clone for CanvasNode
impl Clone for CanvasNode
Source§fn clone(&self) -> CanvasNode
fn clone(&self) -> CanvasNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more