Skip to main content

vello_common/filter/
flood.rs

1// Copyright 2026 the Vello Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4//! The flood filter.
5
6use crate::color::{AlphaColor, Srgb};
7
8/// A flood filter.
9#[derive(Debug)]
10pub struct Flood {
11    /// The flood color.
12    pub color: AlphaColor<Srgb>,
13}
14
15impl Flood {
16    /// Create a new flood filter with the specified color.
17    pub fn new(color: AlphaColor<Srgb>) -> Self {
18        Self { color }
19    }
20}