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.
See the in
attribute
from the Filter Effects Module Level 1.
Fields§
§needs_source_alpha: boolAt least one input is in=SourceAlpha.
needs_background_image: boolAt least one input is in=BackgroundImage.
needs_background_alpha: boolAt least one input is in=BackgroundAlpha.
needs_stroke_paint_image: boolAt least one input is in=StrokePaint.
needs_fill_paint_image: boolAt least one input is in=FillPaint.
Implementations§
Source§impl InputRequirements
impl InputRequirements
Sourcepub fn new_from_filter_specs(specs: &[FilterSpec]) -> InputRequirements
pub fn new_from_filter_specs(specs: &[FilterSpec]) -> InputRequirements
Scans a list of FilterSpec to find out which contents need to be pre-rendered to process the filters.
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
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
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>
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>
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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.