Struct nannou::geom::polyline::Polyline [−][src]
pub struct Polyline<C, J, I, S = DefaultScalar> { pub cap: C, pub join: J, pub points: I, pub thickness: S, }
A polyline described by a list of connected points joined by the given join
style and
ending with the given cap
style,
A Polyline can be triangulated using the triangles()
method.
You can check if a Polyline
contains a given point using the contains(&point)
method.
Fields
cap: C
join: J
points: I
thickness: S
Methods
impl<C, J, I, S> Polyline<C, J, I, S> where
C: Copy,
Tris<C, S>: Cap,
I: Iterator<Item = Point2<S>>,
S: BaseFloat,
[src]
impl<C, J, I, S> Polyline<C, J, I, S> where
C: Copy,
Tris<C, S>: Cap,
I: Iterator<Item = Point2<S>>,
S: BaseFloat,
pub fn new(cap: C, join: J, points: I, thickness: S) -> Self
[src]
pub fn new(cap: C, join: J, points: I, thickness: S) -> Self
pub fn cap<T>(self, cap: T) -> Polyline<T, J, I, S>
[src]
pub fn cap<T>(self, cap: T) -> Polyline<T, J, I, S>
pub fn join<T>(self, join: T) -> Polyline<C, T, I, S>
[src]
pub fn join<T>(self, join: T) -> Polyline<C, T, I, S>
pub fn cap_butt(self) -> Polyline<Butt, J, I, S>
[src]
pub fn cap_butt(self) -> Polyline<Butt, J, I, S>
pub fn cap_round(self) -> Polyline<Round, J, I, S>
[src]
pub fn cap_round(self) -> Polyline<Round, J, I, S>
pub fn cap_square(self) -> Polyline<Square, J, I, S>
[src]
pub fn cap_square(self) -> Polyline<Square, J, I, S>
pub fn join_miter(self) -> Polyline<C, Miter, I, S>
[src]
pub fn join_miter(self) -> Polyline<C, Miter, I, S>
pub fn join_round(self) -> Polyline<C, Round, I, S>
[src]
pub fn join_round(self) -> Polyline<C, Round, I, S>
pub fn join_bevel(self) -> Polyline<C, Round, I, S>
[src]
pub fn join_bevel(self) -> Polyline<C, Round, I, S>
ⓘImportant traits for Parts<C, J, I, S>pub fn parts(self) -> Parts<C, J, I, S> where
Tris<C, S>: Cap,
Tris<J, S>: Join,
[src]
ⓘImportant traits for Parts<C, J, I, S>
pub fn parts(self) -> Parts<C, J, I, S> where
Tris<C, S>: Cap,
Tris<J, S>: Join,
Produce an iterator yielding all Part
s that make up the polyline.
impl<C, J, I, S> Polyline<C, J, I, S> where
C: Copy,
J: Copy,
Tris<J, S>: Join<Scalar = S>,
Tris<C, S>: Cap<Scalar = S>,
I: Iterator<Item = Point2<S>>,
S: BaseFloat,
Point2<S>: Vertex<Scalar = S>,
[src]
impl<C, J, I, S> Polyline<C, J, I, S> where
C: Copy,
J: Copy,
Tris<J, S>: Join<Scalar = S>,
Tris<C, S>: Cap<Scalar = S>,
I: Iterator<Item = Point2<S>>,
S: BaseFloat,
Point2<S>: Vertex<Scalar = S>,
ⓘImportant traits for Triangles<C, J, I, S>pub fn triangles(self) -> Triangles<C, J, I, S> where
J: Copy,
Tris<J, S>: Join<Scalar = S>,
Tris<C, S>: Cap<Scalar = S>,
I: Iterator<Item = Point2<S>>,
[src]
ⓘImportant traits for Triangles<C, J, I, S>
pub fn triangles(self) -> Triangles<C, J, I, S> where
J: Copy,
Tris<J, S>: Join<Scalar = S>,
Tris<C, S>: Cap<Scalar = S>,
I: Iterator<Item = Point2<S>>,
Produce an iterator yielding all triangles that make up the polyline.
pub fn bounding_rect(self) -> Option<Rect<S>>
[src]
pub fn bounding_rect(self) -> Option<Rect<S>>
The bounding Rect
of the polyline.
This method triangulates the polyline (with joins, caps, etc) to ensure we get the actual bounds (not just the bounds of the points that describe the line).
Returns None
if the polyline contains no points.
Trait Implementations
impl<C: Clone, J: Clone, I: Clone, S: Clone> Clone for Polyline<C, J, I, S>
[src]
impl<C: Clone, J: Clone, I: Clone, S: Clone> Clone for Polyline<C, J, I, S>
fn clone(&self) -> Polyline<C, J, I, S>
[src]
fn clone(&self) -> Polyline<C, J, I, S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<C: Debug, J: Debug, I: Debug, S: Debug> Debug for Polyline<C, J, I, S>
[src]
impl<C: Debug, J: Debug, I: Debug, S: Debug> Debug for Polyline<C, J, I, S>