pub struct PolygonPlot<'a> { /* private fields */ }Expand description
Builder for polygon plots.
Implementations§
Source§impl<'a> PolygonPlot<'a>
impl<'a> PolygonPlot<'a>
Sourcepub fn new(label: &'a str, x_data: &'a [f64], y_data: &'a [f64]) -> Self
pub fn new(label: &'a str, x_data: &'a [f64], y_data: &'a [f64]) -> Self
Create a new polygon plot with the given label and vertices.
Sourcepub fn with_style(self, style: PlotItemStyle) -> Self
pub fn with_style(self, style: PlotItemStyle) -> Self
Replace the entire item style override for this polygon plot.
Sourcepub fn with_line_color(self, color: [f32; 4]) -> Self
pub fn with_line_color(self, color: [f32; 4]) -> Self
Set the line color. Use the alpha channel to control polygon outline transparency.
Sourcepub fn with_line_weight(self, weight: f32) -> Self
pub fn with_line_weight(self, weight: f32) -> Self
Set the line width in pixels.
Sourcepub fn with_fill_color(self, color: [f32; 4]) -> Self
pub fn with_fill_color(self, color: [f32; 4]) -> Self
Set the fill color.
Sourcepub fn with_fill_alpha(self, alpha: f32) -> Self
pub fn with_fill_alpha(self, alpha: f32) -> Self
Set the fill alpha multiplier.
Sourcepub fn with_flags(self, flags: PolygonFlags) -> Self
pub fn with_flags(self, flags: PolygonFlags) -> Self
Set polygon-specific flags.
Sourcepub fn with_item_flags(self, flags: ItemFlags) -> Self
pub fn with_item_flags(self, flags: ItemFlags) -> Self
Set common item flags for this plot item.
Sourcepub unsafe fn with_data_layout(self, layout: PlotDataLayout) -> Self
pub unsafe fn with_data_layout(self, layout: PlotDataLayout) -> Self
Set the data layout used to read polygon vertices.
§Safety
Every sample address computed from layout must refer to an initialized, properly aligned
f64 within both coordinate allocations retained by this builder.
Sourcepub fn with_offset(self, offset: PlotDataOffset) -> Self
pub fn with_offset(self, offset: PlotDataOffset) -> Self
Set the sample-index offset used to read polygon vertices.
Sourcepub unsafe fn with_stride(self, stride: PlotDataStride) -> Self
pub unsafe fn with_stride(self, stride: PlotDataStride) -> Self
Set the byte stride used to read polygon vertices.
§Safety
Every strided sample read must remain initialized, aligned, and within both coordinate allocations retained by this builder.