pub struct FilterLayerPlacement {
pub pixmap_bbox: RectU16,
pub dest_bbox: RectU16,
pub src_x: u16,
pub src_y: u16,
}Expand description
Metadata about a filter layer and how it should be composited back into the parent layer.
Fields§
§pixmap_bbox: RectU16The conceptual bounding box of the pixmap that needs to be allocated to render a layer correctly, including the area affected by the filter.
For example, if the filter layer contains a rect spanning (200, 200) to (300, 300) with a blur that has a radius exceeding the rectangle 40 pixels on each side, the pixmap bbox will be (160, 160) to (340, 340).
See the comments in FilterLayerPlacement::new for more information.
dest_bbox: RectU16Rectangle in the parent layer’s coordinate space the filtered pixmap is composited into.
See the comments in FilterLayerPlacement::new for more information.
src_x: u16Source x offset used when sampling from the filter pixmap.
See the comments in FilterLayerPlacement::new for more information.
src_y: u16Source y offset used when sampling from the filter pixmap.
See the comments in FilterLayerPlacement::new for more information.
Implementations§
Source§impl FilterLayerPlacement
impl FilterLayerPlacement
pub(crate) const EMPTY: Self
pub(crate) fn new(bbox: RectU16, filter_plan: &FilterData) -> Self
Sourcepub fn src_origin(self) -> (u16, u16)
pub fn src_origin(self) -> (u16, u16)
Return the source origin of the filter layer.
Trait Implementations§
Source§impl Clone for FilterLayerPlacement
impl Clone for FilterLayerPlacement
Source§fn clone(&self) -> FilterLayerPlacement
fn clone(&self) -> FilterLayerPlacement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more