fn build_auxiliary_line(
    points: &[Pos2],
    to_screen: &RectTransform,
    aux_stroke: &Stroke,
) -> Vec<Shape> {
    let mut shapes = Vec::new();
    if points.len() >= 2 {
        let points: Vec<Pos2> = points.iter().map(|p| to_screen * *p).collect();
        shapes.push(egui::Shape::line(points, *aux_stroke));
    }
    for point in points.iter() {
        let center = to_screen * *point;
        let radius = aux_stroke.width * 3.0;
        let circle = CircleShape {
            center,
            radius,
            fill: aux_stroke.color,
            stroke: *aux_stroke,
        };

        shapes.push(circle.into());
    }

    shapes
}
/// An internal function to create auxiliary lines around the current bezier curve
/// or to auxiliary lines (points) before the points meet the bezier curve requirements.
An internal function to create auxiliary lines around the current bezier curve
or to auxiliary lines (points) before the points meet the bezier curve requirements.
An internal function to create auxiliary lines around the current bezier curve or to auxiliary lines ( points ) before the points meet the bezier curve requirements .
fn build_auxiliary_line(
    points: &[Pos2],
    to_screen: &RectTransform,
    aux_stroke: &Stroke,
) -> Vec<Shape> {
    let mut shapes = Vec::new();
    if points.len() >= 2 {
        let points: Vec<Pos2> = points.iter().map(|p| to_screen * *p).collect();
        shapes.push(egui::Shape::line(points, *aux_stroke));
    }
    for point in points.iter() {
        let center = to_screen * *point;
        let radius = aux_stroke.width * 3.0;
        let circle = CircleShape {
            center,
            radius,
            fill: aux_stroke.color,
            stroke: *aux_stroke,
        };
        shapes.push(circle.into());
    }
    shapes
}
fn build_auxiliary_line ( points : & [ Pos2 ] , to_screen : & RectTransform , aux_stroke : & Stroke , ) -> Vec < Shape > { let mut shapes = Vec :: new ( ) ; if points . len ( ) >= 2 { let points : Vec < Pos2 > = points . iter ( ) . map ( | p | to_screen * * p ) . collect ( ) ; shapes . push ( egui :: Shape :: line ( points , * aux_stroke ) ) ; } for point in points . iter ( ) { let center = to_screen * * point ; let radius = aux_stroke . width * 3.0 ; let circle = CircleShape { center , radius , fill : aux_stroke . color , stroke : * aux_stroke , } ; shapes . push ( circle . into ( ) ) ; } shapes }
An internal function to create auxiliary lines around the current bezier curve
or to auxiliary lines (points) before the points meet the bezier curve requirements.
An internal function to create auxiliary lines around the current bezier curve or to auxiliary lines ( points ) before the points meet the bezier curve requirements .
points
&[Pos2]
to_screen
&RectTransform
aux_stroke
&Stroke
points
&[Pos2]
to_screen
&RectTransform
aux_stroke
&Stroke