MCPcopy Create free account
hub / github.com/emilk/egui_plot / draw_border

Method draw_border

egui_plot/src/items/span.rs:157–169  ·  view source on GitHub ↗
(&self, value: f64, stroke: Stroke, transform: &PlotTransform, shapes: &mut Vec<Shape>)

Source from the content-addressed store, hash-verified

155 }
156
157 fn draw_border(&self, value: f64, stroke: Stroke, transform: &PlotTransform, shapes: &mut Vec<Shape>) {
158 if stroke.color == Color32::TRANSPARENT || stroke.width <= 0.0 || !value.is_finite() {
159 return;
160 }
161
162 let line = match self.axis {
163 Axis::X => Self::vline_points(value, transform),
164 Axis::Y => Self::hline_points(value, transform),
165 };
166
167 self.border_style
168 .style_line(line, PathStroke::new(stroke.width, stroke.color), false, shapes);
169 }
170
171 fn available_width_for_name(&self, rect: &Rect) -> f32 {
172 match self.axis {

Callers 1

shapesMethod · 0.80

Calls 2

is_finiteMethod · 0.80
style_lineMethod · 0.80

Tested by

no test coverage detected