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<'_>,
builder: &mut DisplayListBuilder<'_>,
layer_index: usize,
) -> LayoutRect
pub(super) fn positioning_area( &self, fragment_builder: &'a BuilderForBoxFragment<'_>, builder: &mut DisplayListBuilder<'_>, 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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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