pub struct FigureConfig {Show 13 fields
pub num_axis_ticks: usize,
pub num_grid_horizontal: usize,
pub num_grid_vertical: usize,
pub color_grid: [u8; 3],
pub color_axis: [u8; 3],
pub color_background: [u8; 3],
pub color_title: [u8; 3],
pub font_size_label: f32,
pub font_size_title: f32,
pub font_size_legend: f32,
pub font_size_axis: f32,
pub font_label: String,
pub font_title: String,
}
Expand description
Configuration structure for customizing the appearance of a figure.
Fields§
§num_axis_ticks: usize
Number of ticks along the axes.
num_grid_horizontal: usize
Number of horizontal grid lines.
num_grid_vertical: usize
Number of vertical grid lines.
color_grid: [u8; 3]
Color of the grid lines in RGB format.
color_axis: [u8; 3]
Color of the axes in RGB format.
color_background: [u8; 3]
Background color of the figure in RGB format.
color_title: [u8; 3]
Color of the title text in RGB format.
font_size_label: f32
Font size for labels.
font_size_title: f32
Font size for the title.
font_size_legend: f32
Font size for the legend text.
font_size_axis: f32
Font size for axis labels.
font_label: String
File path to the font used for labels.
font_title: String
File path to the font used for the title.
Trait Implementations§
source§impl Clone for FigureConfig
impl Clone for FigureConfig
source§fn clone(&self) -> FigureConfig
fn clone(&self) -> FigureConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for FigureConfig
impl Default for FigureConfig
source§fn default() -> Self
fn default() -> Self
Provides a default configuration for a figure.
§Default Values
num_axis_ticks
: 10num_grid_horizontal
: 10num_grid_vertical
: 10color_grid
:[200, 200, 200]
(light gray)color_axis
:[0, 0, 0]
(black)color_background
:[255, 255, 255]
(white)color_title
:[0, 0, 0]
(black)font_size_label
: 12.0font_size_title
: 24.0font_size_legend
: 10.0font_size_axis
: 10.0font_label
:../../resources/fonts/Arial.ttf
font_title
:../../resources/fonts/Arial.ttf
§Returns
A FigureConfig
instance with default settings.
Auto Trait Implementations§
impl Freeze for FigureConfig
impl RefUnwindSafe for FigureConfig
impl Send for FigureConfig
impl Sync for FigureConfig
impl Unpin for FigureConfig
impl UnwindSafe for FigureConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.