pub enum LineJoin {
Bevel,
Round,
Miter,
}
Variants§
Implementations§
Source§impl LineJoin
impl LineJoin
Sourcepub fn iterator() -> impl Iterator<Item = LineJoin>
pub fn iterator() -> impl Iterator<Item = LineJoin>
Examples found in repository?
examples/line-joins.rs (line 15)
9pub extern "C" fn draw(){
10
11 // Draw Lines
12 CanvasRenderingContext2D::set_stroke_style_rgba(0, 0, 0, 255);
13 CanvasRenderingContext2D::set_line_width(10);
14 let mut i = 0;
15 for join in LineJoin::iterator() {
16 CanvasRenderingContext2D::set_line_join(join);
17 CanvasRenderingContext2D::begin_path();
18 CanvasRenderingContext2D::move_to(-5.0, 5.0 + i as f32 * 40.);
19 CanvasRenderingContext2D::line_to(35.0, 45.0 + i as f32 * 40.);
20 CanvasRenderingContext2D::line_to(75.0, 5.0 + i as f32 * 40.);
21 CanvasRenderingContext2D::line_to(115.0, 45.0 + i as f32 * 40.);
22 CanvasRenderingContext2D::line_to(155.0, 5.0 + i as f32 * 40.);
23 CanvasRenderingContext2D::stroke();
24 i += 1;
25 }
26}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineJoin
impl RefUnwindSafe for LineJoin
impl Send for LineJoin
impl Sync for LineJoin
impl Unpin for LineJoin
impl UnwindSafe for LineJoin
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