pub struct FilterGraph {
pub primitives: SmallVec<[FilterPrimitive; 1]>,
pub output: FilterId,
next_id: u16,
filter_expansion: Rect,
source_expansion: Rect,
}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.
next_id: u16Next available filter ID (monotonically increasing counter).
filter_expansion: RectAccumulated filter expansion from all primitives in the graph, cached in user space.
source_expansion: RectAccumulated source expansion from all primitives in the graph, cached in user space.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§fn eq(&self, other: &FilterGraph) -> bool
fn eq(&self, other: &FilterGraph) -> bool
self and other values to be equal, and is used by ==.