pub fn draw_filled_ellipse<I>(
image: &I,
center: (i32, i32),
width_radius: i32,
height_radius: i32,
color: I::Pixel,
) -> Image<I::Pixel>where
I: GenericImage,
Expand description
Draws an ellipse and its contents on a new copy of the image.
Draw as much of the ellipse and its contents as lies inside the image bounds.
Uses the Midpoint Ellipse Drawing Algorithm. (Modified from Bresenham’s algorithm)
The ellipse is axis-aligned and satisfies the following equation:
(x^2 / width_radius^2) + (y^2 / height_radius^2) <= 1