pub struct InputRequirements {
pub needs_source_alpha: bool,
pub needs_background_image: bool,
pub needs_background_alpha: bool,
pub needs_stroke_paint_image: bool,
pub needs_fill_paint_image: bool,
}Expand description
Which surfaces need to be provided as inputs for a FilterPlan.
The various filters in a filter property may require different source images that
the calling DrawingCtx is able to compute. For example, if a primitive inside a
<filter> element has in="FillPaint", then the calling DrawingCtx must supply a
surface filled as per the fill property of the element being filtered.
This struct holds the requirements for which such surfaces are needed. The caller is
expected to construct it from an array of FilterSpec, and then to create the
corresponding Input to create a FilterPlan.
Fields§
§needs_source_alpha: bool§needs_background_image: bool§needs_background_alpha: bool§needs_stroke_paint_image: bool§needs_fill_paint_image: boolImplementations§
Source§impl InputRequirements
impl InputRequirements
pub fn new_from_filter_specs(specs: &[FilterSpec]) -> InputRequirements
fn fold(self, r: InputRequirements) -> InputRequirements
Trait Implementations§
Source§impl Debug for InputRequirements
impl Debug for InputRequirements
Source§impl Default for InputRequirements
impl Default for InputRequirements
Source§fn default() -> InputRequirements
fn default() -> InputRequirements
Returns the “default value” for a type. Read more
Source§impl PartialEq for InputRequirements
impl PartialEq for InputRequirements
impl StructuralPartialEq for InputRequirements
Auto Trait Implementations§
impl Freeze for InputRequirements
impl RefUnwindSafe for InputRequirements
impl Send for InputRequirements
impl Sync for InputRequirements
impl Unpin for InputRequirements
impl UnwindSafe for InputRequirements
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.