pub fn draw_ellipse_adaptive(
x: f32,
y: f32,
rx: f32,
ry: f32,
rotation: f32,
c: Color,
)Expand description
draw_ellipse with its segment count chosen from the on-screen size:
from 8 segments for a few-pixel blob shadow to 64 for a large ellipse, the
same curve density as shapes (2–16 segments per quarter turn). Emits
at most 192 vertices; non-finite input draws nothing.
use ferravex_render::{Color, draw_ellipse_adaptive, input::host_frame};
host_frame(1. / 60., 320, 200, || {
// A small contact shadow uses far fewer than draw_ellipse's 96 vertices.
draw_ellipse_adaptive(160., 120., 6., 2.5, 0., Color::new(0., 0., 0., 0.4));
draw_ellipse_adaptive(160., 80., 140., 60., 10., Color::from_hex(0x5bd5d8));
});