Struct webrender::scene_building::ScrollOffsetMapper
source · pub struct ScrollOffsetMapper {
pub current_spatial_node: SpatialNodeIndex,
pub current_offset: LayoutVector2D,
}
Expand description
Offsets primitives (and clips) by the external scroll offset supplied to scroll nodes.
Fields§
§current_spatial_node: SpatialNodeIndex
§current_offset: LayoutVector2D
Implementations§
source§impl ScrollOffsetMapper
impl ScrollOffsetMapper
fn new() -> Self
sourcefn external_scroll_offset(
&mut self,
spatial_node_index: SpatialNodeIndex,
spatial_tree: &SceneSpatialTree,
) -> LayoutVector2D
fn external_scroll_offset( &mut self, spatial_node_index: SpatialNodeIndex, spatial_tree: &SceneSpatialTree, ) -> LayoutVector2D
Return the accumulated external scroll offset for a spatial node. This caches the last result, which is the common case, or defers to the spatial tree to build the value.
Auto Trait Implementations§
impl Freeze for ScrollOffsetMapper
impl RefUnwindSafe for ScrollOffsetMapper
impl Send for ScrollOffsetMapper
impl Sync for ScrollOffsetMapper
impl Unpin for ScrollOffsetMapper
impl UnwindSafe for ScrollOffsetMapper
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> 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