From 3a0d34c0240f4421737a6a08761f99d6f8140d02 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 4 Mar 2023 05:37:11 +0100 Subject: Create `iced_widget` subcrate and re-organize the whole codebase --- graphics/src/geometry/fill.rs | 2 +- graphics/src/geometry/path.rs | 2 +- graphics/src/geometry/path/arc.rs | 2 +- graphics/src/geometry/path/builder.rs | 3 ++- graphics/src/geometry/stroke.rs | 2 +- graphics/src/geometry/style.rs | 2 +- graphics/src/geometry/text.rs | 4 ++-- 7 files changed, 9 insertions(+), 8 deletions(-) (limited to 'graphics/src/geometry') diff --git a/graphics/src/geometry/fill.rs b/graphics/src/geometry/fill.rs index 109d5e99..2e8c1669 100644 --- a/graphics/src/geometry/fill.rs +++ b/graphics/src/geometry/fill.rs @@ -1,5 +1,5 @@ //! Fill [crate::widget::canvas::Geometry] with a certain style. -use crate::{Color, Gradient}; +use iced_core::{Color, Gradient}; pub use crate::geometry::Style; diff --git a/graphics/src/geometry/path.rs b/graphics/src/geometry/path.rs index 30c387c5..c3127bdf 100644 --- a/graphics/src/geometry/path.rs +++ b/graphics/src/geometry/path.rs @@ -9,7 +9,7 @@ pub use builder::Builder; pub use lyon_path; -use crate::{Point, Size}; +use iced_core::{Point, Size}; /// An immutable set of points that may or may not be connected. /// diff --git a/graphics/src/geometry/path/arc.rs b/graphics/src/geometry/path/arc.rs index e0747d3e..2cdebb66 100644 --- a/graphics/src/geometry/path/arc.rs +++ b/graphics/src/geometry/path/arc.rs @@ -1,5 +1,5 @@ //! Build and draw curves. -use crate::{Point, Vector}; +use iced_core::{Point, Vector}; /// A segment of a differentiable curve. #[derive(Debug, Clone, Copy)] diff --git a/graphics/src/geometry/path/builder.rs b/graphics/src/geometry/path/builder.rs index 4a9c5e36..794dd3bc 100644 --- a/graphics/src/geometry/path/builder.rs +++ b/graphics/src/geometry/path/builder.rs @@ -1,5 +1,6 @@ use crate::geometry::path::{arc, Arc, Path}; -use crate::{Point, Size}; + +use iced_core::{Point, Size}; use lyon_path::builder::{self, SvgPathBuilder}; use lyon_path::geom; diff --git a/graphics/src/geometry/stroke.rs b/graphics/src/geometry/stroke.rs index b551a9c9..2d760a6c 100644 --- a/graphics/src/geometry/stroke.rs +++ b/graphics/src/geometry/stroke.rs @@ -1,7 +1,7 @@ //! Create lines from a [crate::widget::canvas::Path] and assigns them various attributes/styles. pub use crate::geometry::Style; -use crate::Color; +use iced_core::Color; /// The style of a stroke. #[derive(Debug, Clone)] diff --git a/graphics/src/geometry/style.rs b/graphics/src/geometry/style.rs index 6794f2e7..be9ee376 100644 --- a/graphics/src/geometry/style.rs +++ b/graphics/src/geometry/style.rs @@ -1,4 +1,4 @@ -use crate::{Color, Gradient}; +use iced_core::{Color, Gradient}; /// The coloring style of some drawing. #[derive(Debug, Clone, PartialEq)] diff --git a/graphics/src/geometry/text.rs b/graphics/src/geometry/text.rs index 8c0b2dfb..06e0b4d0 100644 --- a/graphics/src/geometry/text.rs +++ b/graphics/src/geometry/text.rs @@ -1,5 +1,5 @@ -use crate::alignment; -use crate::{Color, Font, Point}; +use iced_core::alignment; +use iced_core::{Color, Font, Point}; /// A bunch of text that can be drawn to a canvas #[derive(Debug, Clone)] -- cgit