pub struct LayoutPoint {
pub x: LayoutUnit,
pub y: LayoutUnit,
}Expand description
A 2D point in layout coordinate space.
Represents an (x, y) position in logical pixels. Used for node origins and coordinate calculations throughout the layout engine.
Fields§
§x: LayoutUnitHorizontal position in logical pixels.
y: LayoutUnitVertical position in logical pixels.
Implementations§
Source§impl LayoutPoint
impl LayoutPoint
Sourcepub fn new(x: LayoutUnit, y: LayoutUnit) -> Self
pub fn new(x: LayoutUnit, y: LayoutUnit) -> Self
Creates a new point from x and y coordinates.
Trait Implementations§
Source§impl Clone for LayoutPoint
impl Clone for LayoutPoint
Source§fn clone(&self) -> LayoutPoint
fn clone(&self) -> LayoutPoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutPoint
impl Debug for LayoutPoint
Source§impl Default for LayoutPoint
impl Default for LayoutPoint
Source§fn default() -> LayoutPoint
fn default() -> LayoutPoint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LayoutPoint
impl<'de> Deserialize<'de> for LayoutPoint
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 LayoutPoint
impl PartialEq for LayoutPoint
Source§impl Serialize for LayoutPoint
impl Serialize for LayoutPoint
impl Copy for LayoutPoint
impl StructuralPartialEq for LayoutPoint
Auto Trait Implementations§
impl Freeze for LayoutPoint
impl RefUnwindSafe for LayoutPoint
impl Send for LayoutPoint
impl Sync for LayoutPoint
impl Unpin for LayoutPoint
impl UnsafeUnpin for LayoutPoint
impl UnwindSafe for LayoutPoint
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