pub fn path_for_cursor(hot_spot: Point, radius: Coord, render_context: &mut RenderContext) -> Path {
    let kappa = 4.0 / 3.0 * (std::f32::consts::PI / 8.0).tan();
    let control_dist = kappa * radius;
    let mut path_builder = render_context.path_builder().expect("path_builder");
    let center = hot_spot + vec2(radius, radius);
    let left = center + vec2(-radius, 0.0);
    let top = center + vec2(0.0, -radius);
    let right = center + vec2(radius, 0.0);
    let bottom = center + vec2(0.0, radius);
    let top_p1 = center + vec2(control_dist, -radius);
    let top_p2 = center + vec2(radius, -control_dist);
    let right_p1 = center + vec2(radius, control_dist);
    let right_p2 = center + vec2(control_dist, radius);
    let bottom_p1 = center + vec2(-control_dist, radius);
    let bottom_p2 = center + vec2(-radius, control_dist);
    path_builder
        .move_to(hot_spot)
        .line_to(top)
        .cubic_to(top_p1, top_p2, right)
        .cubic_to(right_p1, right_p2, bottom)
        .cubic_to(bottom_p1, bottom_p2, left)
        .line_to(hot_spot);
    path_builder.build()
}
/// Create a render path for a fuchsia-style teardrop cursor.
Create a render path for a fuchsia-style teardrop cursor.
Create a render path for a fuchsia - style teardrop cursor .
pub fn path_for_cursor(hot_spot: Point, radius: Coord, render_context: &mut RenderContext) -> Path {
    let kappa = 4.0 / 3.0 * (std::f32::consts::PI / 8.0).tan();
    let control_dist = kappa * radius;
    let mut path_builder = render_context.path_builder().expect("path_builder");
    let center = hot_spot + vec2(radius, radius);
    let left = center + vec2(-radius, 0.0);
    let top = center + vec2(0.0, -radius);
    let right = center + vec2(radius, 0.0);
    let bottom = center + vec2(0.0, radius);
    let top_p1 = center + vec2(control_dist, -radius);
    let top_p2 = center + vec2(radius, -control_dist);
    let right_p1 = center + vec2(radius, control_dist);
    let right_p2 = center + vec2(control_dist, radius);
    let bottom_p1 = center + vec2(-control_dist, radius);
    let bottom_p2 = center + vec2(-radius, control_dist);
    path_builder
        .move_to(hot_spot)
        .line_to(top)
        .cubic_to(top_p1, top_p2, right)
        .cubic_to(right_p1, right_p2, bottom)
        .cubic_to(bottom_p1, bottom_p2, left)
        .line_to(hot_spot);
    path_builder.build()
}
pub fn path_for_cursor ( hot_spot : Point , radius : Coord , render_context : & mut RenderContext ) -> Path { let kappa = 4.0 / 3.0 * ( std :: f32 :: consts :: PI / 8.0 ) . tan ( ) ; let control_dist = kappa * radius ; let mut path_builder = render_context . path_builder ( ) . expect ( " " ) ; let center = hot_spot + vec2 ( radius , radius ) ; let left = center + vec2 ( - radius , 0.0 ) ; let top = center + vec2 ( 0.0 , - radius ) ; let right = center + vec2 ( radius , 0.0 ) ; let bottom = center + vec2 ( 0.0 , radius ) ; let top_p1 = center + vec2 ( control_dist , - radius ) ; let top_p2 = center + vec2 ( radius , - control_dist ) ; let right_p1 = center + vec2 ( radius , control_dist ) ; let right_p2 = center + vec2 ( control_dist , radius ) ; let bottom_p1 = center + vec2 ( - control_dist , radius ) ; let bottom_p2 = center + vec2 ( - radius , control_dist ) ; path_builder . move_to ( hot_spot ) . line_to ( top ) . cubic_to ( top_p1 , top_p2 , right ) . cubic_to ( right_p1 , right_p2 , bottom ) . cubic_to ( bottom_p1 , bottom_p2 , left ) . line_to ( hot_spot ) ; path_builder . build ( ) }
Create a render path for a fuchsia-style teardrop cursor.
Create a render path for a fuchsia - style teardrop cursor .
hot_spot
Point
radius
Coord
render_context
&mut RenderContext
hot_spot
Point
radius
Coord
render_context
&mut RenderContext