From f436f20eb86b2324126a54d4164b4cedf2134a45 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 12 Feb 2020 03:47:36 +0100 Subject: Draft `Canvas` types and `clock` example --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 7e658ca2..59870692 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -204,5 +204,5 @@ use iced_web as common; pub use common::{ futures, Align, Background, Color, Command, Font, HorizontalAlignment, - Length, Space, Subscription, Vector, VerticalAlignment, + Length, Point, Space, Subscription, Vector, VerticalAlignment, }; -- cgit From 558abf648bdeb86d92e7092f4b023d5e55cc673c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 14 Feb 2020 04:59:31 +0100 Subject: Add transform stack to `canvas::Frame` --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 59870692..d492db02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -204,5 +204,5 @@ use iced_web as common; pub use common::{ futures, Align, Background, Color, Command, Font, HorizontalAlignment, - Length, Point, Space, Subscription, Vector, VerticalAlignment, + Length, Point, Size, Space, Subscription, Vector, VerticalAlignment, }; -- cgit From dadae122533ae0916bebd04d6efab3de145263d4 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 15 Feb 2020 10:08:27 +0100 Subject: Implement MSAA for `triangle` pipeline in `iced_wgpu` --- src/application.rs | 5 +++++ src/settings.rs | 9 +++++++++ 2 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/application.rs b/src/application.rs index 0a4b6d9e..1b73101a 100644 --- a/src/application.rs +++ b/src/application.rs @@ -178,6 +178,11 @@ pub trait Application: Sized { _settings.into(), iced_wgpu::Settings { default_font: _settings.default_font, + antialiasing: if _settings.antialiasing { + Some(iced_wgpu::settings::MSAA::X4) + } else { + None + }, }, ); diff --git a/src/settings.rs b/src/settings.rs index 77c7e0b9..f70e577f 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -16,6 +16,15 @@ pub struct Settings { /// If `None` is provided, a default system font will be chosen. // TODO: Add `name` for web compatibility pub default_font: Option<&'static [u8]>, + + /// If set to true, the renderer will try to use antialiasing for some + /// primitives. + /// + /// Enabling it can produce a smoother result in some widgets, like the + /// `Canvas`, at a performance cost. + /// + /// By default, it is disabled. + pub antialiasing: bool, } #[cfg(not(target_arch = "wasm32"))] -- cgit From 570f769744aabce2d9d9618feadb47e4b92f50ca Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 15 Feb 2020 10:50:07 +0100 Subject: Rename `Settings::antialiasing` to `use_antialiasing` --- src/application.rs | 2 +- src/settings.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/application.rs b/src/application.rs index 1b73101a..8a88b55a 100644 --- a/src/application.rs +++ b/src/application.rs @@ -178,7 +178,7 @@ pub trait Application: Sized { _settings.into(), iced_wgpu::Settings { default_font: _settings.default_font, - antialiasing: if _settings.antialiasing { + antialiasing: if _settings.use_antialiasing { Some(iced_wgpu::settings::MSAA::X4) } else { None diff --git a/src/settings.rs b/src/settings.rs index f70e577f..757dc72f 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -24,7 +24,7 @@ pub struct Settings { /// `Canvas`, at a performance cost. /// /// By default, it is disabled. - pub antialiasing: bool, + pub use_antialiasing: bool, } #[cfg(not(target_arch = "wasm32"))] -- cgit From 9c067562fa765cfc49d09cd9b12fbba96d5619fa Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 18 Feb 2020 08:48:54 +0100 Subject: Write documentation for new `canvas` module --- src/application.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/application.rs b/src/application.rs index 8a88b55a..a569163b 100644 --- a/src/application.rs +++ b/src/application.rs @@ -179,7 +179,7 @@ pub trait Application: Sized { iced_wgpu::Settings { default_font: _settings.default_font, antialiasing: if _settings.use_antialiasing { - Some(iced_wgpu::settings::MSAA::X4) + Some(iced_wgpu::settings::Antialiasing::MSAAx4) } else { None }, -- cgit From 6f7247ca13181bcdfe1a3065215c1b3204723b84 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 18 Feb 2020 09:54:24 +0100 Subject: Rename `Settings::use_antialiasing` to `antialiasing` --- src/application.rs | 2 +- src/settings.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/application.rs b/src/application.rs index a569163b..374810cb 100644 --- a/src/application.rs +++ b/src/application.rs @@ -178,7 +178,7 @@ pub trait Application: Sized { _settings.into(), iced_wgpu::Settings { default_font: _settings.default_font, - antialiasing: if _settings.use_antialiasing { + antialiasing: if _settings.antialiasing { Some(iced_wgpu::settings::Antialiasing::MSAAx4) } else { None diff --git a/src/settings.rs b/src/settings.rs index 757dc72f..32ec583c 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -17,14 +17,14 @@ pub struct Settings { // TODO: Add `name` for web compatibility pub default_font: Option<&'static [u8]>, - /// If set to true, the renderer will try to use antialiasing for some + /// If set to true, the renderer will try to perform antialiasing for some /// primitives. /// /// Enabling it can produce a smoother result in some widgets, like the /// `Canvas`, at a performance cost. /// /// By default, it is disabled. - pub use_antialiasing: bool, + pub antialiasing: bool, } #[cfg(not(target_arch = "wasm32"))] -- cgit