pub fn draw_polygon<I>(
    image: &I,
    poly: &[Point<i32>],
    color: I::Pixel
) -> Image<I::Pixel> where
    I: GenericImage
Expand description

Draws a polygon and its contents on a new copy of an image.

Draws as much of a filled polygon as lies within image bounds. The provided list of points should be an open path, i.e. the first and last points must not be equal. An implicit edge is added from the last to the first point in the slice.