pub struct FilterGraph {
pub primitives: SmallVec<[FilterPrimitive; 1]>,
pub output: FilterId,
/* private fields */
}Expand description
A directed acyclic graph (DAG) of filter operations.
The graph represents a pipeline of filter primitives where outputs of some
primitives can be used as inputs to others. Each primitive has a unique FilterId.
Fields§
§primitives: SmallVec<[FilterPrimitive; 1]>All filter primitives in the graph, stored in insertion order.
output: FilterIdThe final output filter ID whose result is the output of this graph.
Implementations§
Source§impl FilterGraph
impl FilterGraph
Sourcepub fn add(
&mut self,
primitive: FilterPrimitive,
_inputs: Option<FilterInputs>,
) -> FilterId
pub fn add( &mut self, primitive: FilterPrimitive, _inputs: Option<FilterInputs>, ) -> FilterId
Add a filter primitive with optional inputs.
Returns a FilterId that can be referenced by other primitives.
Automatically updates the accumulated source and filter expansion requirements.
Sourcepub fn set_output(&mut self, output: FilterId)
pub fn set_output(&mut self, output: FilterId)
Set the output filter for the graph.
Sourcepub fn filter_expansion(&self, transform: &Affine) -> Rect
pub fn filter_expansion(&self, transform: &Affine) -> Rect
The filter expansion of all filters in the graph, see Filter::filter_expansion.
Sourcepub fn source_expansion(&self, transform: &Affine) -> Rect
pub fn source_expansion(&self, transform: &Affine) -> Rect
The source expansion of all filters in the graph, see Filter::source_expansion.
Trait Implementations§
Source§impl Clone for FilterGraph
impl Clone for FilterGraph
Source§fn clone(&self) -> FilterGraph
fn clone(&self) -> FilterGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilterGraph
impl Debug for FilterGraph
Source§impl Default for FilterGraph
impl Default for FilterGraph
Source§impl PartialEq for FilterGraph
impl PartialEq for FilterGraph
impl StructuralPartialEq for FilterGraph
Auto Trait Implementations§
impl Freeze for FilterGraph
impl RefUnwindSafe for FilterGraph
impl Send for FilterGraph
impl Sync for FilterGraph
impl Unpin for FilterGraph
impl UnsafeUnpin for FilterGraph
impl UnwindSafe for FilterGraph
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