plotters::element

Type Alias Path

Source
pub type Path<Coord> = PathElement<Coord>;
👎Deprecated: Use new name PathElement instead

Aliased Type§

struct Path<Coord> { /* private fields */ }

Implementations

Source§

impl<Coord> PathElement<Coord>

Source

pub fn new<P: Into<Vec<Coord>>, S: Into<ShapeStyle>>( points: P, style: S, ) -> Self

Create a new path

  • points: The iterator of the points
  • style: The shape style
  • returns the created element

Trait Implementations

Source§

impl<Coord, DB: DrawingBackend> Drawable<DB> for PathElement<Coord>

Source§

fn draw<I: Iterator<Item = BackendCoord>>( &self, points: I, backend: &mut DB, _: (u32, u32), ) -> Result<(), DrawingErrorKind<DB::ErrorType>>

Actually draws the element. The key points is already translated into the image coordinate and can be used by DC directly