pub struct Composite { /* private fields */ }Expand description
Draw overlay over base at an offset.
Input order is [base, overlay], matching the reading order of “composite
this over that”.
Implementations§
Source§impl Composite
impl Composite
Sourcepub const fn at(x: i64, y: i64, blend: Blend) -> Composite
pub const fn at(x: i64, y: i64, blend: Blend) -> Composite
Draw the overlay with its top-left corner at (x, y) in base
coordinates.
Negative offsets are allowed: the overlay is clipped to the base rather than rejected, which is what makes “centre a watermark” expressible without the caller doing the clipping arithmetic.
Trait Implementations§
impl Copy for Composite
impl Eq for Composite
Source§impl Op for Composite
impl Op for Composite
Source§fn rescaled(&self) -> Option<Arc<dyn Op>>
fn rescaled(&self) -> Option<Arc<dyn Op>>
Never rescaled, for two independent reasons: the overlay position is in pixels, and the second input is a separate image that would not be reduced alongside the first.
Source§fn output_descriptor(
&self,
inputs: &[ImageDescriptor],
) -> Result<ImageDescriptor, PixelsError>
fn output_descriptor( &self, inputs: &[ImageDescriptor], ) -> Result<ImageDescriptor, PixelsError>
Compute the output shape from the input shapes. Read more
Source§fn input_regions(
&self,
output: Region,
inputs: &[ImageDescriptor],
) -> Result<Vec<Region>, PixelsError>
fn input_regions( &self, output: Region, inputs: &[ImageDescriptor], ) -> Result<Vec<Region>, PixelsError>
The input regions needed to produce
output. Read moreSource§fn compute(
&self,
inputs: &[Tile<'_>],
output: &mut TileMut<'_>,
) -> Result<(), PixelsError>
fn compute( &self, inputs: &[Tile<'_>], output: &mut TileMut<'_>, ) -> Result<(), PixelsError>
Source§fn access_pattern(&self) -> AccessPattern
fn access_pattern(&self) -> AccessPattern
How this op reads its inputs; drives tile negotiation (ADR-0003). Read more
impl StructuralPartialEq for Composite
Auto Trait Implementations§
impl Freeze for Composite
impl RefUnwindSafe for Composite
impl Send for Composite
impl Sync for Composite
impl Unpin for Composite
impl UnsafeUnpin for Composite
impl UnwindSafe for Composite
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