pub struct NodeGraphNodeOrigin {
pub x: f32,
pub y: f32,
}Expand description
Node origin (anchor) used to interpret Node.pos (XyFlow nodeOrigin).
This is expressed as a normalized fraction of the node rect:
(0.0, 0.0)meansNode.posis the node’s top-left.(0.5, 0.5)meansNode.posis the node’s center.
Fields§
§x: f32§y: f32Implementations§
Source§impl NodeGraphNodeOrigin
impl NodeGraphNodeOrigin
pub fn normalized(self) -> Self
Trait Implementations§
Source§impl Clone for NodeGraphNodeOrigin
impl Clone for NodeGraphNodeOrigin
Source§fn clone(&self) -> NodeGraphNodeOrigin
fn clone(&self) -> NodeGraphNodeOrigin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NodeGraphNodeOrigin
Source§impl Debug for NodeGraphNodeOrigin
impl Debug for NodeGraphNodeOrigin
Source§impl Default for NodeGraphNodeOrigin
impl Default for NodeGraphNodeOrigin
Source§fn default() -> NodeGraphNodeOrigin
fn default() -> NodeGraphNodeOrigin
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NodeGraphNodeOrigin
impl<'de> Deserialize<'de> for NodeGraphNodeOrigin
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NodeGraphNodeOrigin
impl PartialEq for NodeGraphNodeOrigin
Source§fn eq(&self, other: &NodeGraphNodeOrigin) -> bool
fn eq(&self, other: &NodeGraphNodeOrigin) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NodeGraphNodeOrigin
impl Serialize for NodeGraphNodeOrigin
impl StructuralPartialEq for NodeGraphNodeOrigin
Auto Trait Implementations§
impl Freeze for NodeGraphNodeOrigin
impl RefUnwindSafe for NodeGraphNodeOrigin
impl Send for NodeGraphNodeOrigin
impl Sync for NodeGraphNodeOrigin
impl Unpin for NodeGraphNodeOrigin
impl UnsafeUnpin for NodeGraphNodeOrigin
impl UnwindSafe for NodeGraphNodeOrigin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more