pub struct WindowLogicalRect(pub LogicalRect);Expand description
A LogicalRect known to be in absolute window coordinates (as output
by the layout engine). All spatial bounds stored in DisplayListItem use
this type so that the compositor is forced to convert them to
frame-relative coordinates before passing them to WebRender.
§Coordinate-space contract
- Layout engine produces
WindowLogicalRectvalues. - Compositor converts via
resolve_rect()→ WebRenderLayoutRect. - Passing a
WindowLogicalRectdirectly to a WebRender push function is a type error (it wrapsLogicalRect, notLayoutRect).
See doc/SCROLL_COORDINATE_ARCHITECTURE.md for background.
Tuple Fields§
§0: LogicalRectImplementations§
Source§impl WindowLogicalRect
impl WindowLogicalRect
pub const fn new(origin: LogicalPosition, size: LogicalSize) -> Self
pub const fn zero() -> Self
Sourcepub const fn inner(&self) -> &LogicalRect
pub const fn inner(&self) -> &LogicalRect
Access the inner LogicalRect (still in window space – the caller is
responsible for applying any offset conversion).
pub const fn into_inner(self) -> LogicalRect
pub fn origin(&self) -> LogicalPosition
pub fn size(&self) -> LogicalSize
Trait Implementations§
Source§impl Clone for WindowLogicalRect
impl Clone for WindowLogicalRect
Source§fn clone(&self) -> WindowLogicalRect
fn clone(&self) -> WindowLogicalRect
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 moreSource§impl Debug for WindowLogicalRect
impl Debug for WindowLogicalRect
Source§impl Default for WindowLogicalRect
impl Default for WindowLogicalRect
Source§fn default() -> WindowLogicalRect
fn default() -> WindowLogicalRect
Returns the “default value” for a type. Read more
Source§impl From<LogicalRect> for WindowLogicalRect
impl From<LogicalRect> for WindowLogicalRect
Source§fn from(r: LogicalRect) -> Self
fn from(r: LogicalRect) -> Self
Converts to this type from the input type.
Source§impl From<WindowLogicalRect> for LogicalRect
impl From<WindowLogicalRect> for LogicalRect
Source§fn from(w: WindowLogicalRect) -> Self
fn from(w: WindowLogicalRect) -> Self
Converts to this type from the input type.
Source§impl Hash for WindowLogicalRect
impl Hash for WindowLogicalRect
Source§impl Ord for WindowLogicalRect
impl Ord for WindowLogicalRect
Source§fn cmp(&self, other: &WindowLogicalRect) -> Ordering
fn cmp(&self, other: &WindowLogicalRect) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WindowLogicalRect
impl PartialEq for WindowLogicalRect
Source§fn eq(&self, other: &WindowLogicalRect) -> bool
fn eq(&self, other: &WindowLogicalRect) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for WindowLogicalRect
impl PartialOrd for WindowLogicalRect
impl Copy for WindowLogicalRect
impl Eq for WindowLogicalRect
impl StructuralPartialEq for WindowLogicalRect
Auto Trait Implementations§
impl Freeze for WindowLogicalRect
impl RefUnwindSafe for WindowLogicalRect
impl Send for WindowLogicalRect
impl Sync for WindowLogicalRect
impl Unpin for WindowLogicalRect
impl UnsafeUnpin for WindowLogicalRect
impl UnwindSafe for WindowLogicalRect
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more