MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / stroke_segment

Function stroke_segment

src/plot_renderer/canvas.rs:453–461  ·  view source on GitHub ↗
(frame: &mut Frame, p0: iced::Point, p1: iced::Point, width: f32, color: Color)

Source from the content-addressed store, hash-verified

451}
452
453fn stroke_segment(frame: &mut Frame, p0: iced::Point, p1: iced::Point, width: f32, color: Color) {
454 let path = canvas::Path::line(p0, p1);
455 frame.stroke(
456 &path,
457 canvas::Stroke::default()
458 .with_width(width)
459 .with_color(color),
460 );
461}
462
463fn draw_styled_line_segment(
464 frame: &mut Frame,

Callers 1

draw_styled_line_segmentFunction · 0.85

Calls 2

with_colorMethod · 0.45
with_widthMethod · 0.45

Tested by

no test coverage detected