[−][src]Struct remote_canvas::Canvas2D
Methods
impl Canvas2D
[src]
pub async fn measure_text<'_>(&'_ mut self, text: String) -> Result<TextMetrics>
[src]
pub fn get_line_width(&self) -> f64
[src]
pub async fn set_line_width<'_>(&'_ mut self, line_width: f64) -> Result<()>
[src]
pub fn get_line_cap(&self) -> LineCap
[src]
pub async fn set_line_cap<'_>(&'_ mut self, line_cap: LineCap) -> Result<()>
[src]
pub fn get_line_join(&self) -> LineJoin
[src]
pub async fn set_line_join<'_>(&'_ mut self, line_join: LineJoin) -> Result<()>
[src]
pub fn get_miter_limit(&self) -> f64
[src]
pub async fn set_miter_limit<'_>(&'_ mut self, miter_limit: f64) -> Result<()>
[src]
pub async fn get_line_dash<'_>(&'_ mut self) -> Result<Vec<f64>>
[src]
pub async fn set_line_dash<'_>(
&'_ mut self,
line_dash: Vec<f64>
) -> Result<Vec<f64>>
[src]
&'_ mut self,
line_dash: Vec<f64>
) -> Result<Vec<f64>>
pub fn get_line_dash_offset(&self) -> f64
[src]
pub async fn set_line_dash_offset<'_>(
&'_ mut self,
line_dash_offset: f64
) -> Result<()>
[src]
&'_ mut self,
line_dash_offset: f64
) -> Result<()>
pub fn get_font(&self) -> &str
[src]
pub async fn set_font<'_, '_>(&'_ mut self, font: &'_ str) -> Result<()>
[src]
pub fn get_text_align(&self) -> TextAlign
[src]
pub async fn set_text_align<'_>(
&'_ mut self,
text_align: TextAlign
) -> Result<()>
[src]
&'_ mut self,
text_align: TextAlign
) -> Result<()>
pub fn get_text_baseline(&self) -> TextBaseline
[src]
pub async fn set_text_baseline<'_>(
&'_ mut self,
text_baseline: TextBaseline
) -> Result<()>
[src]
&'_ mut self,
text_baseline: TextBaseline
) -> Result<()>
pub fn get_text_direction(&self) -> TextDirection
[src]
pub async fn set_text_direction<'_>(
&'_ mut self,
text_direction: TextDirection
) -> Result<()>
[src]
&'_ mut self,
text_direction: TextDirection
) -> Result<()>
pub fn get_fill_style(&self) -> &str
[src]
pub async fn set_fill_style<'_, '_>(
&'_ mut self,
fill_style: &'_ str
) -> Result<()>
[src]
&'_ mut self,
fill_style: &'_ str
) -> Result<()>
pub fn get_stroke_style(&self) -> &str
[src]
pub async fn set_stroke_style<'_, '_>(
&'_ mut self,
stroke_style: &'_ str
) -> Result<()>
[src]
&'_ mut self,
stroke_style: &'_ str
) -> Result<()>
pub fn get_shadow_blur(&self) -> f64
[src]
pub async fn set_shadow_blur<'_>(&'_ mut self, shadow_blur: f64) -> Result<()>
[src]
pub fn get_shadow_color(&self) -> &str
[src]
pub async fn set_shadow_color<'_, '_>(
&'_ mut self,
shadow_color: &'_ str
) -> Result<()>
[src]
&'_ mut self,
shadow_color: &'_ str
) -> Result<()>
pub fn get_shadow_offset_x(&self) -> f64
[src]
pub async fn set_shadow_offset_x<'_>(
&'_ mut self,
shadow_offset_x: f64
) -> Result<()>
[src]
&'_ mut self,
shadow_offset_x: f64
) -> Result<()>
pub fn get_shadow_offset_y(&self) -> f64
[src]
pub async fn set_shadow_offset_y<'_>(
&'_ mut self,
shadow_offset_y: f64
) -> Result<()>
[src]
&'_ mut self,
shadow_offset_y: f64
) -> Result<()>
pub fn get_global_alpha(&self) -> f64
[src]
pub async fn set_global_alpha<'_>(&'_ mut self, global_alpha: f64) -> Result<()>
[src]
pub fn get_global_composite_operation(&self) -> &str
[src]
pub async fn set_global_composite_operation<'_, '_>(
&'_ mut self,
global_composite_operation: &'_ str
) -> Result<()>
[src]
&'_ mut self,
global_composite_operation: &'_ str
) -> Result<()>
pub fn get_image_smoothing_enabled(&self) -> bool
[src]
pub async fn set_image_smoothing_enabled<'_>(
&'_ mut self,
image_smoothing_enabled: bool
) -> Result<()>
[src]
&'_ mut self,
image_smoothing_enabled: bool
) -> Result<()>
pub fn get_image_smoothing_quality(&self) -> Option<ImageSmoothingQuality>
[src]
pub async fn set_image_smoothing_quality<'_>(
&'_ mut self,
image_smoothing_quality: Option<ImageSmoothingQuality>
) -> Result<()>
[src]
&'_ mut self,
image_smoothing_quality: Option<ImageSmoothingQuality>
) -> Result<()>
pub fn get_filter(&self) -> Option<&str>
[src]
pub async fn set_filter<'_, '_>(
&'_ mut self,
filter: Option<&'_ str>
) -> Result<()>
[src]
&'_ mut self,
filter: Option<&'_ str>
) -> Result<()>
pub fn get_width(&self) -> u32
[src]
pub async fn set_width<'_>(&'_ mut self, width: u32) -> Result<()>
[src]
pub fn get_height(&self) -> u32
[src]
pub async fn set_height<'_>(&'_ mut self, height: u32) -> Result<()>
[src]
pub async fn clear_rect<'_>(
&'_ mut self,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
[src]
&'_ mut self,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
pub async fn fill_rect<'_>(
&'_ mut self,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
[src]
&'_ mut self,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
pub async fn stroke_rect<'_>(
&'_ mut self,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
[src]
&'_ mut self,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
pub async fn fill_text<'_, '_>(
&'_ mut self,
text: &'_ str,
x: f64,
y: f64,
max_width: Option<f64>
) -> Result<()>
[src]
&'_ mut self,
text: &'_ str,
x: f64,
y: f64,
max_width: Option<f64>
) -> Result<()>
pub async fn stroke_text<'_, '_>(
&'_ mut self,
text: &'_ str,
x: f64,
y: f64,
max_width: Option<f64>
) -> Result<()>
[src]
&'_ mut self,
text: &'_ str,
x: f64,
y: f64,
max_width: Option<f64>
) -> Result<()>
pub async fn create_linear_gradient<'_>(
&'_ mut self,
x0: f64,
y0: f64,
x1: f64,
y1: f64,
stops: Vec<(f64, String)>
) -> Result<()>
[src]
&'_ mut self,
x0: f64,
y0: f64,
x1: f64,
y1: f64,
stops: Vec<(f64, String)>
) -> Result<()>
pub async fn create_radial_gradient<'_>(
&'_ mut self,
x0: f64,
y0: f64,
r0: f64,
x1: f64,
y1: f64,
r1: f64,
stops: Vec<(f64, String)>
) -> Result<()>
[src]
&'_ mut self,
x0: f64,
y0: f64,
r0: f64,
x1: f64,
y1: f64,
r1: f64,
stops: Vec<(f64, String)>
) -> Result<()>
pub async fn create_pattern<'_, '_>(
&'_ mut self,
url: &'_ str,
repitition: PatternRepitition
) -> Result<()>
[src]
&'_ mut self,
url: &'_ str,
repitition: PatternRepitition
) -> Result<()>
pub async fn begin_path<'_>(&'_ mut self, path_uuid: Option<Uuid>) -> Result<()>
[src]
pub async fn close_path<'_>(&'_ mut self, path_uuid: Option<Uuid>) -> Result<()>
[src]
pub async fn move_to<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64
) -> Result<()>
pub async fn line_to<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64
) -> Result<()>
pub async fn bezier_curve_to<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
) -> Result<()>
pub async fn quadratic_curve_to<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
cpx: f64,
cpy: f64,
x: f64,
y: f64
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
cpx: f64,
cpy: f64,
x: f64,
y: f64
) -> Result<()>
pub async fn arc<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
) -> Result<()>
pub async fn arc_to<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x1: f64,
y1: f64,
x2: f64,
y2: f64,
radius: f64
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x1: f64,
y1: f64,
x2: f64,
y2: f64,
radius: f64
) -> Result<()>
pub async fn ellipse<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
) -> Result<()>
pub async fn rect<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
width: f64,
height: f64
) -> Result<()>
pub async fn fill<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
is_even_odd: bool
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
is_even_odd: bool
) -> Result<()>
pub async fn stroke<'_>(&'_ mut self, path_uuid: Option<Uuid>) -> Result<()>
[src]
pub async fn clip<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
is_even_odd: bool
) -> Result<()>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
is_even_odd: bool
) -> Result<()>
pub async fn is_point_in_path<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
is_even_odd: bool
) -> Result<bool>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64,
is_even_odd: bool
) -> Result<bool>
pub async fn is_point_in_stroke<'_>(
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64
) -> Result<bool>
[src]
&'_ mut self,
path_uuid: Option<Uuid>,
x: f64,
y: f64
) -> Result<bool>
pub async fn get_transform<'_>(&'_ mut self) -> Result<DomMatrix>
[src]
pub async fn rotate<'_>(&'_ mut self, angle: f64) -> Result<()>
[src]
pub async fn scale<'_>(&'_ mut self, x: f64, y: f64) -> Result<()>
[src]
pub async fn translate<'_>(&'_ mut self, x: f64, y: f64) -> Result<()>
[src]
pub async fn transform<'_>(&'_ mut self, matrix: DomMatrix) -> Result<()>
[src]
pub async fn set_transform<'_>(&'_ mut self, matrix: DomMatrix) -> Result<()>
[src]
pub async fn draw_image<'_, '_>(
&'_ mut self,
url: &'_ str,
source: Option<(f64, f64, f64, f64)>,
dx: f64,
dy: f64,
d_dims: Option<(f64, f64)>
) -> Result<()>
[src]
&'_ mut self,
url: &'_ str,
source: Option<(f64, f64, f64, f64)>,
dx: f64,
dy: f64,
d_dims: Option<(f64, f64)>
) -> Result<()>
pub async fn get_image_data<'_>(
&'_ mut self,
sx: f64,
sy: f64,
sw: f64,
sh: f64
) -> Result<ImageData>
[src]
&'_ mut self,
sx: f64,
sy: f64,
sw: f64,
sh: f64
) -> Result<ImageData>
pub async fn set_image_data<'_>(
&'_ mut self,
image_data: ImageData,
dx: f64,
dy: f64,
dirty_pos: Option<(f64, f64)>,
dirty_dims: Option<(f64, f64)>
) -> Result<()>
[src]
&'_ mut self,
image_data: ImageData,
dx: f64,
dy: f64,
dirty_pos: Option<(f64, f64)>,
dirty_dims: Option<(f64, f64)>
) -> Result<()>
pub async fn save<'_>(&'_ mut self) -> Result<()>
[src]
pub async fn restore<'_>(&'_ mut self) -> Result<()>
[src]
pub async fn to_data_url<'_, '_>(
&'_ mut self,
mime_type: &'_ str,
quality: Option<f64>
) -> Result<String>
[src]
&'_ mut self,
mime_type: &'_ str,
quality: Option<f64>
) -> Result<String>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Canvas2D
impl Send for Canvas2D
impl Sync for Canvas2D
impl Unpin for Canvas2D
impl !UnwindSafe for Canvas2D
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,