pub fn draw_circle(center_x: f32, center_y: f32, radius: f32) -> Vec<Draw> {
    use self::Draw::*;
    use self::PathOp::*;

    // Generate the circle and turn it into bezier curves
    let circle                          = arc::Circle::new(Coord2(center_x as f64, center_y as f64), radius as f64);
    let curves: Vec<bezier::Curve<_>>   = circle.to_curves();
    let start_point                     = curves[0].start_point();

    // Draw the curves
    let curves  = curves.into_iter().map(|curve| Draw::from(&curve));

    // Complete the path
    let path    = iter::once(Path(Move(start_point.x() as f32, start_point.y() as f32)))
        .chain(curves)
        .chain(iter::once(Path(ClosePath)));

    path.collect()
}
///
/// Returns the drawing commands for a circle
///
Returns the drawing commands for a circle
Returns the drawing commands for a circle
pub fn draw_circle(center_x: f32, center_y: f32, radius: f32) -> Vec<Draw> {
    use self::Draw::*;
    use self::PathOp::*;
    // Generate the circle and turn it into bezier curves
    let circle                          = arc::Circle::new(Coord2(center_x as f64, center_y as f64), radius as f64);
    let curves: Vec<bezier::Curve<_>>   = circle.to_curves();
    let start_point                     = curves[0].start_point();
    // Draw the curves
    let curves  = curves.into_iter().map(|curve| Draw::from(&curve));
    // Complete the path
    let path    = iter::once(Path(Move(start_point.x() as f32, start_point.y() as f32)))
        .chain(curves)
        .chain(iter::once(Path(ClosePath)));
    path.collect()
}
pub fn draw_circle ( center_x : f32 , center_y : f32 , radius : f32 ) -> Vec < Draw > { use self :: Draw :: * ; use self :: PathOp :: * ; // Generate the circle and turn it into bezier curves let circle = arc :: Circle :: new ( Coord2 ( center_x as f64 , center_y as f64 ) , radius as f64 ) ; let curves : Vec < bezier :: Curve < _ > > = circle . to_curves ( ) ; let start_point = curves [ 0 ] . start_point ( ) ; // Draw the curves let curves = curves . into_iter ( ) . map ( | curve | Draw :: from ( & curve ) ) ; // Complete the path let path = iter :: once ( Path ( Move ( start_point . x ( ) as f32 , start_point . y ( ) as f32 ) ) ) . chain ( curves ) . chain ( iter :: once ( Path ( ClosePath ) ) ) ; path . collect ( ) }
Returns the drawing commands for a circle
Returns the drawing commands for a circle
center_x
f32
center_y
f32
radius
f32