pub struct Rect {
pub x: f64,
pub y: f64,
pub w: f64,
pub h: f64,
}Expand description
An axis-aligned rectangle in scene (top-left origin, y-down) coordinates, in pixels.
Used to carry the print trim box on a Scene when a page declares a
positive bleed margin. The scene canvas (width/height) is the full
media box including the bleed; the trim rect is the inner rectangle the
finished piece is cut down to.
Fields§
§x: f64Left edge in pixels (scene coordinates).
y: f64Top edge in pixels (scene coordinates).
w: f64Width in pixels.
h: f64Height in pixels.
Trait Implementations§
impl Copy for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations§
impl Freeze for Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnsafeUnpin for Rect
impl UnwindSafe for Rect
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