Struct nannou::ui::prelude::widget::grid::Lines [−][src]
pub struct Lines<T> { pub step: T, pub offset: Option<T>, pub thickness: Option<f64>, pub color: Option<Color>, }
A series of lines distributed across an axis.
Fields
step: T
The distance that separates each line.
offset: Option<T>
An optional offset for the lines along they're axis.
thickness: Option<f64>
The thickness of each of the lines drawn.
If None
, the thickness
specified within the Style
is used.
color: Option<Color>
The color of each of the lines drawn.
If None
, the color
specified within the Style
is used.
Methods
impl<T> Lines<T>
[src]
impl<T> Lines<T>
pub fn step(step: T) -> Lines<T>
[src]
pub fn step(step: T) -> Lines<T>
Begin building a new set of lines for the grid step
distance apart.
Lines with a step
that equates to 0.0
or less will not be drawn.
pub fn offset(self, offset: T) -> Lines<T>
[src]
pub fn offset(self, offset: T) -> Lines<T>
Specify an offset for the grid.
Offsets that are greater than the step
size will be wrapped around the step
size.
pub fn thickness(self, thickness: f64) -> Lines<T>
[src]
pub fn thickness(self, thickness: f64) -> Lines<T>
Specify a unique thickness for these lines.
pub fn color(self, color: Color) -> Lines<T>
[src]
pub fn color(self, color: Color) -> Lines<T>
Use the specified color to uniquely color the this set of lines.
pub fn x<Y>(self) -> Axis<T, Y>
[src]
pub fn x<Y>(self) -> Axis<T, Y>
Move the lines over the X axis.
pub fn y<X>(self) -> Axis<X, T>
[src]
pub fn y<X>(self) -> Axis<X, T>
Move the lines over the Y axis.
Trait Implementations
impl<T> Clone for Lines<T> where
T: Clone,
[src]
impl<T> Clone for Lines<T> where
T: Clone,
fn clone(&self) -> Lines<T>
[src]
fn clone(&self) -> Lines<T>
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)
Performs copy-assignment from source
. Read more
impl<T> Debug for Lines<T> where
T: Debug,
[src]
impl<T> Debug for Lines<T> where
T: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T> Copy for Lines<T> where
T: Copy,
[src]
impl<T> Copy for Lines<T> where
T: Copy,