[−][src]Struct conrod_core::widget::primitive::point_path::PointPath
A simple, non-interactive widget for drawing a series of lines and/or points.
Fields
points: I
Some iterator yielding a series of Points.
common: CommonBuilder
Data necessary and common for all widget builder types.
style: Style
Unique styling for the PointPath.
maybe_shift_to_centre_from: Option<Point>
Whether or not the points should be automatically centred to the widget position.
Implementations
impl<I> PointPath<I>
[src][−]
pub fn styled(points: I, style: Style) -> Self
[src][−]
The same as PointPath::new but with th given style.
pub fn new(points: I) -> Self
[src][−]
Build a new default PointPath widget.
Note that this does not automatically set the position of the bounding box for the
widget. It is recommended that you also see the abs
and centred
constructors for smart
positioning and layout that automatically infer the position and size of the bounding box.
This method should only be preferred if the user can also specify the correct bounding box
position and size as this will be more efficient than the abs
or centred
methods.
pub fn abs(points: I) -> Self where
I: IntoIterator<Item = Point> + Clone,
[src][−]
I: IntoIterator<Item = Point> + Clone,
Build a new PointPath whose bounding box is fit to the absolute co-ordinates of the points.
This requires that the points
iterator is Clone
so that we may iterate through and
determine the bounding box of the points
.
If you would rather centre the points to the middle of the bounding box, use PointPath::centred instead.
pub fn abs_styled(points: I, style: Style) -> Self where
I: IntoIterator<Item = Point> + Clone,
[src][−]
I: IntoIterator<Item = Point> + Clone,
The same as PointPath::abs but constructs the PointPath with the given style.
pub fn centred(points: I) -> Self where
I: IntoIterator<Item = Point> + Clone,
[src][−]
I: IntoIterator<Item = Point> + Clone,
Build a new PointPath and shift the location of the points so that the centre of their bounding rectangle lies at the position determined for the PointPath widget.
This is useful if your points simply describe a shape and you want to position them using conrod's auto-layout or Positionable methods.
If you would rather centre the bounding box to the points, use PointPath::abs instead.
pub fn centred_styled(points: I, style: Style) -> Self where
I: IntoIterator<Item = Point> + Clone,
[src][−]
I: IntoIterator<Item = Point> + Clone,
The same as PointPath::centred but constructs the PointPath with the given style.
pub fn thickness(self, thickness: Scalar) -> Self
[src][−]
The thickness or width of the PointPath's lines.
Use this instead of Positionable::width
for the thickness of the Line
, as width
and
height
refer to the dimensions of the bounding rectangle.
pub fn solid(self) -> Self
[src][−]
Make a Solid line.
pub fn dashed(self) -> Self
[src][−]
Make a line with a Dashed pattern.
pub fn dotted(self) -> Self
[src][−]
Make a line with a Dotted pattern.
Trait Implementations
impl<I: Clone> Clone for PointPath<I>
[src][+]
impl<I> Colorable for PointPath<I>
[src][+]
impl<I> Common for PointPath<I>
[src][+]
impl<I: Debug> Debug for PointPath<I>
[src][+]
impl<I> Widget for PointPath<I> where
I: IntoIterator<Item = Point>,
[src][+]
I: IntoIterator<Item = Point>,
Auto Trait Implementations
impl<I> RefUnwindSafe for PointPath<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I> Send for PointPath<I> where
I: Send,
I: Send,
impl<I> Sync for PointPath<I> where
I: Sync,
I: Sync,
impl<I> Unpin for PointPath<I> where
I: Unpin,
I: Unpin,
impl<I> UnwindSafe for PointPath<I> where
I: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<W> Positionable for W where
W: Widget,
[src][+]
W: Widget,
impl<W> Sizeable for W where
W: Widget,
[src][+]
W: Widget,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,