pub struct SvgTheme {Show 13 fields
pub background: String,
pub surface: String,
pub grid: String,
pub axis: String,
pub text: String,
pub text_secondary: String,
pub legend_bg: String,
pub curve_c0_c180: String,
pub curve_c0_c180_fill: String,
pub curve_c90_c270: String,
pub curve_c90_c270_fill: String,
pub font_family: String,
pub labels: SvgLabels,
}Expand description
Theme configuration for SVG diagrams
Fields§
§background: StringBackground color
surface: StringPlot surface color
grid: StringGrid line color
axis: StringAxis line color (darker grid)
text: StringPrimary text color
text_secondary: StringSecondary text color
legend_bg: StringLegend background
curve_c0_c180: StringC0-C180 curve color (typically blue)
curve_c0_c180_fill: StringC0-C180 fill color
curve_c90_c270: StringC90-C270 curve color (typically red)
curve_c90_c270_fill: StringC90-C270 fill color
font_family: StringFont family
labels: SvgLabelsLocalized labels for diagram text
Implementations§
Source§impl SvgTheme
impl SvgTheme
Sourcepub fn css_variables() -> Self
pub fn css_variables() -> Self
Theme using CSS variables (for web with dynamic theming)
Sourcepub fn with_labels(self, labels: SvgLabels) -> Self
pub fn with_labels(self, labels: SvgLabels) -> Self
Set labels for this theme (for i18n)
Sourcepub fn c_plane_color(&self, index: usize) -> &str
pub fn c_plane_color(&self, index: usize) -> &str
Get a color for a C-plane index
Trait Implementations§
impl StructuralPartialEq for SvgTheme
Auto Trait Implementations§
impl Freeze for SvgTheme
impl RefUnwindSafe for SvgTheme
impl Send for SvgTheme
impl Sync for SvgTheme
impl Unpin for SvgTheme
impl UnsafeUnpin for SvgTheme
impl UnwindSafe for SvgTheme
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