summaryrefslogtreecommitdiffstats
path: root/wgpu/src/settings.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-24 19:08:21 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-24 19:08:21 +0100
commite77fa175aa0eaf62be4ebafbd8e0dbc5df18f006 (patch)
tree78608f77c6db3ff1e61a58008bd54d114f32352c /wgpu/src/settings.rs
parent7cb1452d29ddfdcd29fd7ecc7c96a79ea2681fce (diff)
parentfd7d9622e333a0a2cd5c2e8e6cc38cc09d7981e4 (diff)
downloadiced-e77fa175aa0eaf62be4ebafbd8e0dbc5df18f006.tar.gz
iced-e77fa175aa0eaf62be4ebafbd8e0dbc5df18f006.tar.bz2
iced-e77fa175aa0eaf62be4ebafbd8e0dbc5df18f006.zip
Merge branch 'master' into feature/text-selection
Diffstat (limited to '')
-rw-r--r--wgpu/src/settings.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/wgpu/src/settings.rs b/wgpu/src/settings.rs
index 65853ce2..f946ce0d 100644
--- a/wgpu/src/settings.rs
+++ b/wgpu/src/settings.rs
@@ -5,8 +5,13 @@
/// The settings of a [`Renderer`].
///
/// [`Renderer`]: ../struct.Renderer.html
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Settings {
+ /// The output format of the [`Renderer`].
+ ///
+ /// [`Renderer`]: ../struct.Renderer.html
+ pub format: wgpu::TextureFormat,
+
/// The bytes of the font that will be used by default.
///
/// If `None` is provided, a default system font will be chosen.
@@ -16,6 +21,16 @@ pub struct Settings {
pub antialiasing: Option<Antialiasing>,
}
+impl Default for Settings {
+ fn default() -> Settings {
+ Settings {
+ format: wgpu::TextureFormat::Bgra8UnormSrgb,
+ default_font: None,
+ antialiasing: None,
+ }
+ }
+}
+
/// An antialiasing strategy.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Antialiasing {