Skip to main content

resolve_corner_radius

Function resolve_corner_radius 

Source
fn resolve_corner_radius(
    ix: f32,
    iy: f32,
    ax: f32,
    ay: f32,
    ra: LayoutSize,
    bx: f32,
    by: f32,
    rb: LayoutSize,
    sx: f32,
    sy: f32,
) -> Option<LayoutSize>
Expand description

Determine the radius at a single corner of the intersection of two rounded rects. Each corner is identified by:

  • (ix, iy): corner position in the intersection rect
  • (ax, ay), ra: corner position and radius from rect A
  • (bx, by), rb: corner position and radius from rect B
  • (sx, sy): direction signs toward the interior (e.g. top-left = +1,+1)