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

Method shapes

egui_plot/src/items/line.rs:112–127  ·  view source on GitHub ↗
(&self, _ui: &Ui, transform: &PlotTransform, shapes: &mut Vec<Shape>)

Source from the content-addressed store, hash-verified

110
111impl PlotItem for HLine {
112 fn shapes(&self, _ui: &Ui, transform: &PlotTransform, shapes: &mut Vec<Shape>) {
113 let Self {
114 base, y, stroke, style, ..
115 } = self;
116
117 let points = vec![
118 transform.position_from_point(&PlotPoint::new(transform.bounds().min[0], *y)),
119 transform.position_from_point(&PlotPoint::new(transform.bounds().max[0], *y)),
120 ];
121 style.style_line(
122 points,
123 PathStroke::new(stroke.width, stroke.color),
124 base.highlight,
125 shapes,
126 );
127 }
128
129 fn initialize(&mut self, _x_range: RangeInclusive<f64>) {}
130

Callers

nothing calls this directly

Calls 1

style_lineMethod · 0.80

Tested by

no test coverage detected