summaryrefslogtreecommitdiffstats
path: root/tiny_skia/src/settings.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-25 15:38:25 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-25 15:38:25 +0100
commit8c373cd497e370d356b480380482779397bdb510 (patch)
treef640a1161e702cbb981d3b89f3e7a11ee390923c /tiny_skia/src/settings.rs
parenta01bc865a0561ff1daf255c4746746acf67524f0 (diff)
downloadiced-8c373cd497e370d356b480380482779397bdb510.tar.gz
iced-8c373cd497e370d356b480380482779397bdb510.tar.bz2
iced-8c373cd497e370d356b480380482779397bdb510.zip
Scaffold `iced_tiny_skia` and connect it to `iced_renderer`
Diffstat (limited to 'tiny_skia/src/settings.rs')
-rw-r--r--tiny_skia/src/settings.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tiny_skia/src/settings.rs b/tiny_skia/src/settings.rs
new file mode 100644
index 00000000..88098345
--- /dev/null
+++ b/tiny_skia/src/settings.rs
@@ -0,0 +1,24 @@
+use crate::Font;
+
+/// The settings of a [`Backend`].
+///
+/// [`Backend`]: crate::Backend
+#[derive(Debug, Clone, Copy, PartialEq)]
+pub struct Settings {
+ /// The default [`Font`] to use.
+ pub default_font: Font,
+
+ /// The default size of text.
+ ///
+ /// By default, it will be set to `16.0`.
+ pub default_text_size: f32,
+}
+
+impl Default for Settings {
+ fn default() -> Settings {
+ Settings {
+ default_font: Font::SansSerif,
+ default_text_size: 16.0,
+ }
+ }
+}