pub trait PlotItemStyled: Sized {
// Required method
fn style_mut(&mut self) -> &mut PlotItemStyle;
// Provided methods
fn with_style(self, style: PlotItemStyle) -> Self { ... }
fn with_line_color(self, color: [f32; 4]) -> Self { ... }
fn with_line_weight(self, weight: f32) -> Self { ... }
fn with_fill_color(self, color: [f32; 4]) -> Self { ... }
fn with_fill_alpha(self, alpha: f32) -> Self { ... }
fn with_marker(self, marker: Marker) -> Self { ... }
fn with_marker_size(self, size: f32) -> Self { ... }
fn with_marker_line_color(self, color: [f32; 4]) -> Self { ... }
fn with_marker_fill_color(self, color: [f32; 4]) -> Self { ... }
fn with_size(self, size: f32) -> Self { ... }
}Expand description
Shared ImPlot item-style builder methods for plot builders backed by ImPlotSpec.
Importing dear_implot::* brings this trait into scope, so every supported
plot builder exposes the same styling methods.
Required Methods§
fn style_mut(&mut self) -> &mut PlotItemStyle
Provided Methods§
Sourcefn with_style(self, style: PlotItemStyle) -> Self
fn with_style(self, style: PlotItemStyle) -> Self
Replace the entire item style override for this plot.
Sourcefn with_line_color(self, color: [f32; 4]) -> Self
fn with_line_color(self, color: [f32; 4]) -> Self
Set the line color. Use the alpha channel to control line transparency.
Sourcefn with_line_weight(self, weight: f32) -> Self
fn with_line_weight(self, weight: f32) -> Self
Set the line width in pixels.
Sourcefn with_fill_color(self, color: [f32; 4]) -> Self
fn with_fill_color(self, color: [f32; 4]) -> Self
Set the fill color.
Sourcefn with_fill_alpha(self, alpha: f32) -> Self
fn with_fill_alpha(self, alpha: f32) -> Self
Set the fill alpha multiplier used for fills and marker faces.
Sourcefn with_marker(self, marker: Marker) -> Self
fn with_marker(self, marker: Marker) -> Self
Set the marker type.
Sourcefn with_marker_size(self, size: f32) -> Self
fn with_marker_size(self, size: f32) -> Self
Set the marker size in pixels.
Sourcefn with_marker_line_color(self, color: [f32; 4]) -> Self
fn with_marker_line_color(self, color: [f32; 4]) -> Self
Set the marker outline color.
Sourcefn with_marker_fill_color(self, color: [f32; 4]) -> Self
fn with_marker_fill_color(self, color: [f32; 4]) -> Self
Set the marker fill color.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.