From 5d0fffc626928177239336757507b986b081b878 Mon Sep 17 00:00:00 2001 From: shan Date: Fri, 30 Sep 2022 10:27:00 -0700 Subject: Fixed some importing issues since you can use a Shader::Gradient outside a Canvas widget, where it was previously only accessible. --- examples/modern_art/Cargo.toml | 1 + examples/modern_art/src/main.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/modern_art') diff --git a/examples/modern_art/Cargo.toml b/examples/modern_art/Cargo.toml index 4995e9a7..8242f7e4 100644 --- a/examples/modern_art/Cargo.toml +++ b/examples/modern_art/Cargo.toml @@ -7,4 +7,5 @@ publish = false [dependencies] iced = { path = "../..", features = ["canvas", "tokio", "debug"] } +iced_graphics = { path = "../../graphics" } rand = "0.8.5" \ No newline at end of file diff --git a/examples/modern_art/src/main.rs b/examples/modern_art/src/main.rs index 7b04b581..c7945012 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, Gradient}; +use crate::canvas::{Cursor, FillStyle, Geometry}; use iced::widget::canvas::{Cache, Fill, Frame}; use iced::widget::{canvas, Canvas}; use iced::Settings; @@ -7,6 +7,7 @@ use iced::{ executor, Application, Color, Command, Element, Length, Point, Rectangle, Renderer, Size, Theme, }; +use iced_graphics::gradient::Gradient; fn main() -> iced::Result { ModernArt::run(Settings { -- cgit