Draft new iced_graphics crate 🎉
This commit is contained in:
parent
d4743183d4
commit
05af8d00d4
100 changed files with 861 additions and 1755 deletions
20
graphics/src/widget/canvas/fill.rs
Normal file
20
graphics/src/widget/canvas/fill.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use iced_native::Color;
|
||||
|
||||
/// The style used to fill geometry.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum Fill {
|
||||
/// Fill with a color.
|
||||
Color(Color),
|
||||
}
|
||||
|
||||
impl Default for Fill {
|
||||
fn default() -> Fill {
|
||||
Fill::Color(Color::BLACK)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Color> for Fill {
|
||||
fn from(color: Color) -> Fill {
|
||||
Fill::Color(color)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue