pub type DrawingPolygonInit<'a> = Drawing<'a, PolygonInit>;
Expand description

Initialised drawing state for a polygon.

Aliased Type§

struct DrawingPolygonInit<'a> { /* private fields */ }

Implementations§

source§

impl<'a> DrawingPolygonInit<'a>

source

pub fn stroke<C>(self, color: C) -> Self

Stroke the outline with the given color.

source

pub fn events<I>(self, events: I) -> DrawingPolygon<'a>
where I: IntoIterator<Item = PathEvent>,

Describe the polygon with a sequence of path events.

source

pub fn points<I>(self, points: I) -> DrawingPolygon<'a>
where I: IntoIterator, I::Item: Into<Point2>,

Describe the polygon with a sequence of points.

source

pub fn points_colored<I, P, C>(self, points: I) -> DrawingPolygon<'a>

Consumes an iterator of points and converts them to an iterator yielding path events.

source

pub fn points_textured<I, P, T>( self, view: &dyn ToTextureView, points: I ) -> DrawingPolygon<'a>
where I: IntoIterator<Item = (P, T)>, P: Into<Point2>, T: Into<TexCoords>,

Describe the polygon with an iterator yielding textured poings.