CanvasDevice

Trait CanvasDevice 

Source
pub trait CanvasDevice {
Show 22 methods // Required methods fn restore(&self); fn save(&self); fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64); fn set_fill_style_str(&self, value: &str); fn fill_rect(&self, x: f64, y: f64, w: f64, h: f64); fn put_image_data(&self, imagedata: &ImageData, dx: f64, dy: f64); fn global_composite_operation(&self) -> String; fn set_global_composite_operation(&self, value: &str); fn draw_image_with_offscreen_canvas( &self, image: &OffscreenCanvas, dx: f64, dy: f64, ); fn clip_with_path_2d(&self, path: &Path2d); fn set_stroke_style_str(&self, value: &str); fn stroke_with_path(&self, path: &Path2d); fn draw_image_with_image_bitmap_and_dw_and_dh( &self, image: &ImageBitmap, dx: f64, dy: f64, dw: f64, dh: f64, ); fn draw_image_with_offscreen_canvas_and_dw_and_dh( &self, image: &OffscreenCanvas, dx: f64, dy: f64, dw: f64, dh: f64, ); fn set_line_width(&self, value: f64); fn set_line_cap(&self, value: &str); fn set_line_join(&self, value: &str); fn set_miter_limit(&self, value: f64); fn set_line_dash_offset(&self, value: f64); fn set_line_dash(&self, segments: &JsValue); fn fill_with_path_2d(&self, path: &Path2d); fn fill_with_path_2d_and_winding( &self, path: &Path2d, winding: CanvasWindingRule, );
}

Required Methods§

Source

fn restore(&self)

The restore() method.

MDN Documentation

Source

fn save(&self)

The save() method.

MDN Documentation

Source

fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)

The setTransform() method.

MDN Documentation

Source

fn set_fill_style_str(&self, value: &str)

Setter for the fillStyle field of this object.

MDN Documentation

Source

fn fill_rect(&self, x: f64, y: f64, w: f64, h: f64)

The fillRect() method.

MDN Documentation

Source

fn put_image_data(&self, imagedata: &ImageData, dx: f64, dy: f64)

The putImageData() method.

MDN Documentation

Source

fn global_composite_operation(&self) -> String

Getter for the globalCompositeOperation field of this object.

MDN Documentation

Source

fn set_global_composite_operation(&self, value: &str)

Setter for the globalCompositeOperation field of this object.

MDN Documentation

Source

fn draw_image_with_offscreen_canvas( &self, image: &OffscreenCanvas, dx: f64, dy: f64, )

The drawImage() method.

MDN Documentation

Source

fn clip_with_path_2d(&self, path: &Path2d)

The clip() method.

MDN Documentation

Source

fn set_stroke_style_str(&self, value: &str)

Setter for the strokeStyle field of this object.

MDN Documentation

Source

fn stroke_with_path(&self, path: &Path2d)

The stroke() method.

MDN Documentation

Source

fn draw_image_with_image_bitmap_and_dw_and_dh( &self, image: &ImageBitmap, dx: f64, dy: f64, dw: f64, dh: f64, )

The drawImage() method.

MDN Documentation

Source

fn draw_image_with_offscreen_canvas_and_dw_and_dh( &self, image: &OffscreenCanvas, dx: f64, dy: f64, dw: f64, dh: f64, )

The drawImage() method.

MDN Documentation

Source

fn set_line_width(&self, value: f64)

Setter for the lineWidth field of this object.

MDN Documentation

Source

fn set_line_cap(&self, value: &str)

Setter for the lineCap field of this object.

MDN Documentation

Source

fn set_line_join(&self, value: &str)

Setter for the lineJoin field of this object.

MDN Documentation

Source

fn set_miter_limit(&self, value: f64)

Setter for the miterLimit field of this object.

MDN Documentation

Source

fn set_line_dash_offset(&self, value: f64)

Setter for the lineDashOffset field of this object.

MDN Documentation

Source

fn set_line_dash(&self, segments: &JsValue)

The setLineDash() method.

MDN Documentation

Source

fn fill_with_path_2d(&self, path: &Path2d)

The fill() method.

MDN Documentation

Source

fn fill_with_path_2d_and_winding( &self, path: &Path2d, winding: CanvasWindingRule, )

The fill() method.

MDN Documentation

Implementations on Foreign Types§

Source§

impl CanvasDevice for CanvasRenderingContext2d

Source§

fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)

Source§

fn put_image_data(&self, imagedata: &ImageData, dx: f64, dy: f64)

Source§

fn global_composite_operation(&self) -> String

Source§

fn set_global_composite_operation(&self, value: &str)

Source§

fn set_fill_style_str(&self, value: &str)

Source§

fn fill_rect(&self, x: f64, y: f64, w: f64, h: f64)

Source§

fn draw_image_with_offscreen_canvas( &self, image: &OffscreenCanvas, dx: f64, dy: f64, )

Source§

fn clip_with_path_2d(&self, path: &Path2d)

Source§

fn set_stroke_style_str(&self, value: &str)

Source§

fn stroke_with_path(&self, path: &Path2d)

Source§

fn draw_image_with_image_bitmap_and_dw_and_dh( &self, image: &ImageBitmap, dx: f64, dy: f64, dw: f64, dh: f64, )

Source§

fn draw_image_with_offscreen_canvas_and_dw_and_dh( &self, image: &OffscreenCanvas, dx: f64, dy: f64, dw: f64, dh: f64, )

Source§

fn set_line_width(&self, value: f64)

Source§

fn set_line_cap(&self, value: &str)

Source§

fn set_line_join(&self, value: &str)

Source§

fn set_miter_limit(&self, value: f64)

Source§

fn set_line_dash_offset(&self, value: f64)

Source§

fn restore(&self)

Source§

fn save(&self)

Source§

fn set_line_dash(&self, segments: &JsValue)

Source§

fn fill_with_path_2d(&self, path: &Path2d)

Source§

fn fill_with_path_2d_and_winding( &self, path: &Path2d, winding: CanvasWindingRule, )

Source§

impl CanvasDevice for OffscreenCanvasRenderingContext2d

Source§

fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)

Source§

fn put_image_data(&self, imagedata: &ImageData, dx: f64, dy: f64)

Source§

fn global_composite_operation(&self) -> String

Source§

fn set_global_composite_operation(&self, value: &str)

Source§

fn set_fill_style_str(&self, value: &str)

Source§

fn fill_rect(&self, x: f64, y: f64, w: f64, h: f64)

Source§

fn draw_image_with_offscreen_canvas( &self, image: &OffscreenCanvas, dx: f64, dy: f64, )

Source§

fn clip_with_path_2d(&self, path: &Path2d)

Source§

fn set_stroke_style_str(&self, value: &str)

Source§

fn stroke_with_path(&self, path: &Path2d)

Source§

fn draw_image_with_image_bitmap_and_dw_and_dh( &self, image: &ImageBitmap, dx: f64, dy: f64, dw: f64, dh: f64, )

Source§

fn draw_image_with_offscreen_canvas_and_dw_and_dh( &self, image: &OffscreenCanvas, dx: f64, dy: f64, dw: f64, dh: f64, )

Source§

fn set_line_width(&self, value: f64)

Source§

fn set_line_cap(&self, value: &str)

Source§

fn set_line_join(&self, value: &str)

Source§

fn set_miter_limit(&self, value: f64)

Source§

fn set_line_dash_offset(&self, value: f64)

Source§

fn restore(&self)

Source§

fn save(&self)

Source§

fn set_line_dash(&self, segments: &JsValue)

Source§

fn fill_with_path_2d(&self, path: &Path2d)

Source§

fn fill_with_path_2d_and_winding( &self, path: &Path2d, winding: CanvasWindingRule, )

Implementors§