pub struct UnitPoint {
pub x: f64,
pub y: f64,
}Expand description
A point in the unit space of a shape’s bounding box: (0,0) = top-leading, (1,1) = bottom-trailing. Gradient geometry is expressed in unit points so one paint value works for any shape size (docs/shapes.md §3.2).
Fields§
§x: f64§y: f64Implementations§
Source§impl UnitPoint
impl UnitPoint
pub const TOP: UnitPoint
pub const BOTTOM: UnitPoint
pub const LEADING: UnitPoint
pub const TRAILING: UnitPoint
pub const TOP_LEADING: UnitPoint
pub const TOP_TRAILING: UnitPoint
pub const BOTTOM_LEADING: UnitPoint
pub const BOTTOM_TRAILING: UnitPoint
pub const CENTER: UnitPoint
pub const fn new(x: f64, y: f64) -> Self
Trait Implementations§
impl Copy for UnitPoint
impl StructuralPartialEq for UnitPoint
Auto Trait Implementations§
impl Freeze for UnitPoint
impl RefUnwindSafe for UnitPoint
impl Send for UnitPoint
impl Sync for UnitPoint
impl Unpin for UnitPoint
impl UnsafeUnpin for UnitPoint
impl UnwindSafe for UnitPoint
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