pub struct BoundsBuilder {
x: Option<f64>,
y: Option<f64>,
width: Option<f64>,
height: Option<f64>,
transform: Transform,
inverse: Transform,
standard_input_was_referenced: bool,
rect: Option<Rect>,
}Expand description
A helper type for filter primitive subregion computation.
Fields§
§x: Option<f64>Filter primitive attributes.
y: Option<f64>§width: Option<f64>§height: Option<f64>§transform: TransformThe transform to use when generating the rect
inverse: TransformThe inverse transform used when adding rects
standard_input_was_referenced: boolWhether one of the input nodes is standard input.
rect: Option<Rect>The current bounding rectangle.
Implementations§
Source§impl BoundsBuilder
impl BoundsBuilder
Sourcepub fn new(
x: Option<f64>,
y: Option<f64>,
width: Option<f64>,
height: Option<f64>,
transform: Transform,
) -> Self
pub fn new( x: Option<f64>, y: Option<f64>, width: Option<f64>, height: Option<f64>, transform: Transform, ) -> Self
Constructs a new BoundsBuilder.
Sourcepub fn add_input(self, input: &FilterInput) -> Self
pub fn add_input(self, input: &FilterInput) -> Self
Adds a filter primitive input to the bounding box.
Sourcepub fn compute(self, ctx: &FilterContext) -> Bounds
pub fn compute(self, ctx: &FilterContext) -> Bounds
Returns the final exact bounds, both with and without clipping to the effects region.
Auto Trait Implementations§
impl Freeze for BoundsBuilder
impl RefUnwindSafe for BoundsBuilder
impl Send for BoundsBuilder
impl Sync for BoundsBuilder
impl Unpin for BoundsBuilder
impl UnwindSafe for BoundsBuilder
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.