Struct layout_2020::display_list::background::BackgroundPainter
source · pub(super) struct BackgroundPainter<'a> {
pub style: &'a ComputedValues,
pub positioning_area_override: Option<LayoutRect>,
pub painting_area_override: Option<LayoutRect>,
}
Fields§
§style: &'a ComputedValues
§positioning_area_override: Option<LayoutRect>
§painting_area_override: Option<LayoutRect>
Implementations§
source§impl<'a> BackgroundPainter<'a>
impl<'a> BackgroundPainter<'a>
sourcepub(super) fn painting_area(
&self,
fragment_builder: &'a BuilderForBoxFragment<'_>,
builder: &mut DisplayListBuilder<'_>,
layer_index: usize,
) -> LayoutRect
pub(super) fn painting_area( &self, fragment_builder: &'a BuilderForBoxFragment<'_>, builder: &mut DisplayListBuilder<'_>, layer_index: usize, ) -> LayoutRect
Get the painting area for this background, which is the actual rectangle in the current coordinate system that the background will be painted.
fn clip( &self, fragment_builder: &'a BuilderForBoxFragment<'_>, builder: &mut DisplayListBuilder<'_>, layer_index: usize, ) -> Option<ClipChainId>
sourcepub(super) fn common_properties(
&self,
fragment_builder: &'a BuilderForBoxFragment<'_>,
builder: &mut DisplayListBuilder<'_>,
layer_index: usize,
painting_area: LayoutRect,
) -> CommonItemProperties
pub(super) fn common_properties( &self, fragment_builder: &'a BuilderForBoxFragment<'_>, builder: &mut DisplayListBuilder<'_>, layer_index: usize, painting_area: LayoutRect, ) -> CommonItemProperties
Get the wr::CommonItemProperties
for this background. This includes any clipping
established by border radii as well as special clipping and spatial node assignment
necessary for background-attachment
.
sourcepub(super) fn positioning_area(
&self,
fragment_builder: &'a BuilderForBoxFragment<'_>,
layer_index: usize,
) -> LayoutRect
pub(super) fn positioning_area( &self, fragment_builder: &'a BuilderForBoxFragment<'_>, layer_index: usize, ) -> LayoutRect
Get the positioning area of the background which is the rectangle that defines where the origin of the background content is, regardless of where the background is actual painted.
Auto Trait Implementations§
impl<'a> Freeze for BackgroundPainter<'a>
impl<'a> !RefUnwindSafe for BackgroundPainter<'a>
impl<'a> Send for BackgroundPainter<'a>
impl<'a> Sync for BackgroundPainter<'a>
impl<'a> Unpin for BackgroundPainter<'a>
impl<'a> !UnwindSafe for BackgroundPainter<'a>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert