2020-05-28 01:46:17 +02:00
|
|
|
//! Configure a renderer.
|
2020-05-19 20:34:17 +02:00
|
|
|
pub use iced_graphics::Antialiasing;
|
2020-05-19 14:23:28 +02:00
|
|
|
|
|
|
|
|
/// The settings of a [`Renderer`].
|
|
|
|
|
///
|
|
|
|
|
/// [`Renderer`]: ../struct.Renderer.html
|
2020-06-01 22:07:29 +02:00
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
2020-05-19 14:23:28 +02:00
|
|
|
pub struct Settings {
|
|
|
|
|
/// The bytes of the font that will be used by default.
|
|
|
|
|
///
|
|
|
|
|
/// If `None` is provided, a default system font will be chosen.
|
|
|
|
|
pub default_font: Option<&'static [u8]>,
|
|
|
|
|
|
|
|
|
|
/// The antialiasing strategy that will be used for triangle primitives.
|
|
|
|
|
pub antialiasing: Option<Antialiasing>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Default for Settings {
|
|
|
|
|
fn default() -> Settings {
|
|
|
|
|
Settings {
|
|
|
|
|
default_font: None,
|
|
|
|
|
antialiasing: None,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|