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
Methods
impl Line[src]
impl Linepub fn new(color: Color, radius: Radius) -> Line[src]
pub fn new(color: Color, radius: Radius) -> LineCreates a new line
pub fn new_round(color: Color, radius: Radius) -> Line[src]
pub fn new_round(color: Color, radius: Radius) -> LineCreates a new line
pub fn color(self, value: Color) -> Self[src]
pub fn color(self, value: Color) -> SelfSets color.
pub fn radius(self, value: Radius) -> Self[src]
pub fn radius(self, value: Radius) -> SelfSets radius.
pub fn width(self, value: Width) -> Self[src]
pub fn width(self, value: Width) -> SelfSets width.
pub fn shape(self, value: Shape) -> Self[src]
pub fn shape(self, value: Shape) -> SelfSets shape.
pub fn draw<L: Into<Line>, G>(
&self,
line: L,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics, [src]
pub fn draw<L: Into<Line>, G>(
&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]
pub fn draw_tri<L: Into<Line>, G>(
&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]
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, Draws an arrow
Head size is the sides of the triangle between the arrow hooks and the line
Trait Implementations
impl Colored for Line[src]
impl Colored for Linefn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> SelfMultiplies with red, green, blue and alpha values.
fn hue_rad(self, angle: ColorComponent) -> Self[src]
fn hue_rad(self, angle: ColorComponent) -> SelfRotates hue by radians.
fn tint(self, f: ColorComponent) -> Self[src]
fn tint(self, f: ColorComponent) -> SelfMixes the current color with white. Read more
fn shade(self, f: ColorComponent) -> Self[src]
fn shade(self, f: ColorComponent) -> SelfMixes the current color with black. Read more
fn hue_deg(self, angle: ColorComponent) -> Self[src]
fn hue_deg(self, angle: ColorComponent) -> SelfRotates hue by degrees.
impl Copy for Line[src]
impl Copy for Lineimpl Clone for Line[src]
impl Clone for Line