Struct piston_window::Line
source · pub struct Line {
pub color: [f32; 4],
pub radius: f64,
pub shape: Shape,
}
Expand description
A colored line with a default border radius
Fields§
§color: [f32; 4]
The line color
radius: f64
The line radius
shape: Shape
The line shape
Implementations§
source§impl Line
impl Line
sourcepub fn draw_from_to<P, G>(
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: [[f64; 3]; 2],
g: &mut G
)where
P: Into<[f64; 2]>,
G: Graphics,
pub fn draw_from_to<P, G>( &self, from: P, to: P, draw_state: &DrawState, transform: [[f64; 3]; 2], g: &mut G )where P: Into<[f64; 2]>, G: Graphics,
Draws line using default method between points.
sourcepub fn draw<L, G>(
&self,
line: L,
draw_state: &DrawState,
transform: [[f64; 3]; 2],
g: &mut G
)where
L: Into<[f64; 4]>,
G: Graphics,
pub fn draw<L, G>( &self, line: L, draw_state: &DrawState, transform: [[f64; 3]; 2], g: &mut G )where L: Into<[f64; 4]>, G: Graphics,
Draws line using default method.
Trait Implementations§
source§impl Colored for Line
impl Colored for Line
impl Copy for Line
Auto Trait Implementations§
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more