pub struct Line {
pub color: Color,
pub radius: Radius,
pub shape: Shape,
}
Expand description
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§
source§impl Line
impl Line
sourcepub fn draw_from_to<P: Into<Vec2d>, G>(
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G,
)where
G: Graphics,
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,
Draws line using default method between points.
sourcepub fn draw<L: Into<Line>, G>(
&self,
line: L,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G,
)where
G: Graphics,
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.
Trait Implementations§
source§impl Colored for Line
impl Colored for Line
source§fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent,
) -> Self
fn mul_rgba( self, r: ColorComponent, g: ColorComponent, b: ColorComponent, a: ColorComponent, ) -> Self
Multiplies with red, green, blue and alpha values.
source§fn hue_rad(self, angle: ColorComponent) -> Self
fn hue_rad(self, angle: ColorComponent) -> Self
Rotates hue by radians.
source§fn tint(self, f: ColorComponent) -> Self
fn tint(self, f: ColorComponent) -> Self
Mixes the current color with white. Read more
source§fn shade(self, f: ColorComponent) -> Self
fn shade(self, f: ColorComponent) -> Self
Mixes the current color with black. Read more
source§fn hue_deg(self, angle: ColorComponent) -> Self
fn hue_deg(self, angle: ColorComponent) -> Self
Rotates hue by degrees.
impl Copy for Line
Auto Trait Implementations§
impl Freeze for Line
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)