Function fill_rounded_rect

Source
pub fn fill_rounded_rect(rect: Rect, radius: f32, fill: impl Into<Fill>)
Expand description

Filled, anti-aliased rounded rectangle. radius is clamped to half the shorter side; zero gives crisp-but-smooth square corners. Emits at most 612 vertices, or 2,592 for a subdivided Fill::Radial.

use ferravex_render::{Color, Rect, shapes};
shapes::fill_rounded_rect(Rect::new(10., 10., 120., 40.), 8., Color::from_hex(0x1f2a3d));