summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/canvas/fill.rs
diff options
context:
space:
mode:
authorLibravatar shan <shankern@protonmail.com>2022-10-04 18:24:46 -0700
committerLibravatar shan <shankern@protonmail.com>2022-10-04 18:24:46 -0700
commit6e7b3ced0b1daf368e44e181ecdb4ae529877eb6 (patch)
treee530025c737d509b640172d595cff0a0809f5a40 /graphics/src/widget/canvas/fill.rs
parent5d0fffc626928177239336757507b986b081b878 (diff)
downloadiced-6e7b3ced0b1daf368e44e181ecdb4ae529877eb6.tar.gz
iced-6e7b3ced0b1daf368e44e181ecdb4ae529877eb6.tar.bz2
iced-6e7b3ced0b1daf368e44e181ecdb4ae529877eb6.zip
Reworked wgpu buffers, updated glow side to have proper transform location storage, attempting to fix visibility modifiers, implemented some of the feedback received in initial PR.
Diffstat (limited to 'graphics/src/widget/canvas/fill.rs')
-rw-r--r--graphics/src/widget/canvas/fill.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/graphics/src/widget/canvas/fill.rs b/graphics/src/widget/canvas/fill.rs
index 60029e03..6f10505c 100644
--- a/graphics/src/widget/canvas/fill.rs
+++ b/graphics/src/widget/canvas/fill.rs
@@ -8,7 +8,7 @@ pub struct Fill<'a> {
/// The color or gradient of the fill.
///
/// By default, it is set to [`FillStyle::Solid`] `BLACK`.
- pub style: FillStyle<'a>,
+ pub style: Style<'a>,
/// The fill rule defines how to determine what is inside and what is
/// outside of a shape.
@@ -24,7 +24,7 @@ pub struct Fill<'a> {
impl <'a> Default for Fill<'a> {
fn default() -> Fill<'a> {
Fill {
- style: FillStyle::Solid(Color::BLACK),
+ style: Style::Solid(Color::BLACK),
rule: FillRule::NonZero,
}
}
@@ -33,7 +33,7 @@ impl <'a> Default for Fill<'a> {
impl<'a> From<Color> for Fill<'a> {
fn from(color: Color) -> Fill<'a> {
Fill {
- style: FillStyle::Solid(color),
+ style: Style::Solid(color),
..Fill::default()
}
}
@@ -41,18 +41,18 @@ impl<'a> From<Color> for Fill<'a> {
/// The color or gradient of a [`Fill`].
#[derive(Debug, Clone)]
-pub enum FillStyle<'a> {
+pub enum Style<'a> {
/// A solid color
Solid(Color),
/// A color gradient
Gradient(&'a Gradient),
}
-impl <'a> Into<Shader> for FillStyle<'a> {
+impl <'a> Into<Shader> for Style<'a> {
fn into(self) -> Shader {
match self {
- FillStyle::Solid(color) => Shader::Solid(color),
- FillStyle::Gradient(gradient) => gradient.clone().into()
+ Style::Solid(color) => Shader::Solid(color),
+ Style::Gradient(gradient) => gradient.clone().into()
}
}
}