Struct graphics::line::Line [−][src]
A colored line with a default border radius
Fields
color: Color
The line color
radius: Radius
The line radius
shape: Shape
The line shape
Implementations
impl Line
[src]
pub fn new(color: Color, radius: Radius) -> Line
[src]
Creates a new line
pub fn new_round(color: Color, radius: Radius) -> Line
[src]
Creates a new line
pub fn color(self, value: Color) -> Self
[src]
Sets color.
pub fn radius(self, value: Radius) -> Self
[src]
Sets radius.
pub fn width(self, value: Width) -> Self
[src]
Sets width.
pub fn shape(self, value: Shape) -> Self
[src]
Sets shape.
pub fn draw_from_to<P: Into<Vec2d>, G>(
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
Draws line using default method between points.
pub fn draw<L: Into<Line>, G>(
&self,
line: L,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&self,
line: L,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
Draws line using default method.
pub fn draw_tri<L: Into<Line>, G>(
&self,
line: L,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&self,
line: L,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
Draws line using triangulation.
pub fn draw_arrow<L: Into<Line>, G>(
&self,
line: L,
head_size: Scalar,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&self,
line: L,
head_size: Scalar,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
Draws an arrow
Head size is the sides of the triangle between the arrow hooks and the line
Trait Implementations
impl Clone for Line
[src]
impl Colored for Line
[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
fn hue_rad(self, angle: ColorComponent) -> Self
[src]
fn tint(self, f: ColorComponent) -> Self
[src]
fn shade(self, f: ColorComponent) -> Self
[src]
fn hue_deg(self, angle: ColorComponent) -> Self
[src]
impl Copy for Line
[src]
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
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,