iced_graphics/settings.rs
1use crate::Antialiasing;
2use crate::core::{Font, Pixels};
3
4/// The settings of a renderer.
5#[derive(Debug, Clone, Copy, PartialEq)]
6pub struct Settings {
7 /// The default [`Font`] to use.
8 pub default_font: Font,
9
10 /// The default size of text.
11 ///
12 /// By default, it will be set to `16.0`.
13 pub default_text_size: Pixels,
14
15 /// The antialiasing strategy that will be used for triangle primitives.
16 ///
17 /// By default, it is `None`.
18 pub antialiasing: Option<Antialiasing>,
19}
20
21impl Default for Settings {
22 fn default() -> Settings {
23 Settings {
24 default_font: Font::default(),
25 default_text_size: Pixels(16.0),
26 antialiasing: None,
27 }
28 }
29}