summaryrefslogtreecommitdiffstats
path: root/examples/modern_art
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 /examples/modern_art
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 'examples/modern_art')
-rw-r--r--examples/modern_art/src/main.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/modern_art/src/main.rs b/examples/modern_art/src/main.rs
index c7945012..238c9a0f 100644
--- a/examples/modern_art/src/main.rs
+++ b/examples/modern_art/src/main.rs
@@ -1,5 +1,5 @@
use rand::{Rng, thread_rng};
-use crate::canvas::{Cursor, FillStyle, Geometry};
+use crate::canvas::{Cursor, Geometry};
use iced::widget::canvas::{Cache, Fill, Frame};
use iced::widget::{canvas, Canvas};
use iced::Settings;
@@ -8,6 +8,7 @@ use iced::{
Renderer, Size, Theme,
};
use iced_graphics::gradient::Gradient;
+use iced_graphics::widget::canvas::Style;
fn main() -> iced::Result {
ModernArt::run(Settings {
@@ -120,7 +121,7 @@ fn generate_box(frame: &mut Frame, bounds: Size) -> bool {
top_left,
size,
Fill {
- style: FillStyle::Solid(random_color()),
+ style: Style::Solid(random_color()),
.. Default::default()
}
);
@@ -129,7 +130,7 @@ fn generate_box(frame: &mut Frame, bounds: Size) -> bool {
top_left,
size,
Fill {
- style: FillStyle::Gradient(&gradient(
+ style: Style::Gradient(&gradient(
top_left,
Point::new(top_left.x + size.width, top_left.y + size.height)
)),