diff --git a/components/canvas/backend.rs b/components/canvas/backend.rs index 966c8205c25..0a89ad7a0c3 100644 --- a/components/canvas/backend.rs +++ b/components/canvas/backend.rs @@ -20,7 +20,7 @@ pub(crate) trait GenericDrawTarget { fn new(size: Size2D) -> Self; fn create_similar_draw_target(&self, size: &Size2D) -> Self; - fn clear_rect(&mut self, rect: &Rect, transform: Transform2D); + fn clear_rect(&mut self, rect: &Rect, transform: Transform2D); fn copy_surface( &mut self, surface: Self::SourceSurface, @@ -35,7 +35,7 @@ pub(crate) trait GenericDrawTarget { source: Rect, filter: Filter, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ); fn draw_surface_with_shadow( &self, @@ -50,7 +50,7 @@ pub(crate) trait GenericDrawTarget { fill_rule: FillRule, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ); fn fill_text( &mut self, @@ -58,18 +58,18 @@ pub(crate) trait GenericDrawTarget { start: Point2D, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ); fn fill_rect( &mut self, rect: &Rect, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ); fn get_size(&self) -> Size2D; fn pop_clip(&mut self); - fn push_clip(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D); + fn push_clip(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D); fn push_clip_rect(&mut self, rect: &Rect); fn stroke( &mut self, @@ -77,7 +77,7 @@ pub(crate) trait GenericDrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ); fn stroke_rect( &mut self, @@ -85,7 +85,7 @@ pub(crate) trait GenericDrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ); fn surface(&mut self) -> Self::SourceSurface; fn image_descriptor_and_serializable_data( diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs index 6acf08158fb..33bf7fc0d5d 100644 --- a/components/canvas/canvas_data.rs +++ b/components/canvas/canvas_data.rs @@ -141,7 +141,7 @@ impl CanvasData { smoothing_enabled: bool, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { // We round up the floating pixel values to draw the pixels let source_rect = source_rect.ceil(); @@ -194,7 +194,7 @@ impl CanvasData { style: FillOrStrokeStyle, text_options: &TextOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { // > Step 2: Replace all ASCII whitespace in text with U+0020 SPACE characters. let text = replace_ascii_whitespace(text); @@ -299,7 +299,7 @@ impl CanvasData { text_options: TextOptions, _shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { let Some(ref font_style) = text_options.font else { return; @@ -481,7 +481,7 @@ impl CanvasData { style: FillOrStrokeStyle, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { if style.is_zero_size_gradient() { return; // Paint nothing if gradient size is zero. @@ -512,7 +512,7 @@ impl CanvasData { } } - pub(crate) fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { + pub(crate) fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { self.drawtarget.clear_rect(rect, transform); } @@ -523,7 +523,7 @@ impl CanvasData { line_options: LineOptions, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { if style.is_zero_size_gradient() { return; // Paint nothing if gradient size is zero. @@ -571,7 +571,7 @@ impl CanvasData { style: FillOrStrokeStyle, _shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { if style.is_zero_size_gradient() { return; // Paint nothing if gradient size is zero. @@ -597,7 +597,7 @@ impl CanvasData { line_options: LineOptions, _shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { if style.is_zero_size_gradient() { return; // Paint nothing if gradient size is zero. @@ -620,7 +620,7 @@ impl CanvasData { &mut self, path: &Path, fill_rule: FillRule, - transform: Transform2D, + transform: Transform2D, ) { self.drawtarget.push_clip(path, fill_rule, transform); } @@ -673,21 +673,23 @@ impl CanvasData { rect: &Rect, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, draw_shadow_source: F, ) where - F: FnOnce(&mut DrawTarget, Transform2D), + F: FnOnce(&mut DrawTarget, Transform2D), { - let shadow_src_rect = transform.outer_transformed_rect(rect); - let mut new_draw_target = self.create_draw_target_for_shadow(&shadow_src_rect); - let shadow_transform = transform.then( - &Transform2D::identity() - .pre_translate(-shadow_src_rect.origin.to_vector().cast::()), - ); + let shadow_src_rect = transform.outer_transformed_rect(&rect.cast()); + // Because this comes from the rect on f32 precision, casting it down should be ok. + let mut new_draw_target = self.create_draw_target_for_shadow(&shadow_src_rect.cast()); + let shadow_transform = transform + .then(&Transform2D::identity().pre_translate(-shadow_src_rect.origin.to_vector())); draw_shadow_source(&mut new_draw_target, shadow_transform); self.drawtarget.draw_surface_with_shadow( new_draw_target.surface(), - &Point2D::new(shadow_src_rect.origin.x, shadow_src_rect.origin.y), + &Point2D::new( + shadow_src_rect.origin.x as f32, + shadow_src_rect.origin.y as f32, + ), shadow_options, composition_options, ); @@ -700,7 +702,7 @@ impl CanvasData { style: FillOrStrokeStyle, composition_options: CompositionOptions, path_bound_box: &Rect, - transform: Transform2D, + transform: Transform2D, draw_shape: F, ) where F: FnOnce(&mut Self, FillOrStrokeStyle), @@ -778,7 +780,7 @@ fn write_image( dest_rect: Rect, smoothing_enabled: bool, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { if snapshot.size().is_empty() { return; diff --git a/components/canvas/canvas_paint_thread.rs b/components/canvas/canvas_paint_thread.rs index 9f675038646..c98d91a53a3 100644 --- a/components/canvas/canvas_paint_thread.rs +++ b/components/canvas/canvas_paint_thread.rs @@ -371,7 +371,7 @@ impl Canvas { text_options: TextOptions, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { match self { #[cfg(feature = "raqote")] @@ -423,7 +423,7 @@ impl Canvas { style: FillOrStrokeStyle, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { match self { #[cfg(feature = "raqote")] @@ -449,7 +449,7 @@ impl Canvas { line_options: LineOptions, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { match self { #[cfg(feature = "raqote")] @@ -490,7 +490,7 @@ impl Canvas { style: FillOrStrokeStyle, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { match self { #[cfg(feature = "raqote")] @@ -531,7 +531,7 @@ impl Canvas { line_options: LineOptions, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { match self { #[cfg(feature = "raqote")] @@ -565,7 +565,7 @@ impl Canvas { } } - fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { + fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { match self { #[cfg(feature = "raqote")] Canvas::Raqote(canvas_data) => canvas_data.clear_rect(rect, transform), @@ -585,7 +585,7 @@ impl Canvas { smoothing_enabled: bool, shadow_options: ShadowOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { match self { #[cfg(feature = "raqote")] @@ -646,7 +646,7 @@ impl Canvas { } } - fn clip_path(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D) { + fn clip_path(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D) { match self { #[cfg(feature = "raqote")] Canvas::Raqote(canvas_data) => canvas_data.clip_path(path, fill_rule, transform), diff --git a/components/canvas/raqote_backend.rs b/components/canvas/raqote_backend.rs index 5c9507f7595..183b329468d 100644 --- a/components/canvas/raqote_backend.rs +++ b/components/canvas/raqote_backend.rs @@ -184,7 +184,7 @@ impl GenericDrawTarget for raqote::DrawTarget { raqote::DrawTarget::new(size.width as i32, size.height as i32) } - fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { + fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { ::fill_rect( self, rect, @@ -230,7 +230,7 @@ impl GenericDrawTarget for raqote::DrawTarget { src: Rect, filter: Filter, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { let paint_transform = raqote::Transform::translation(-dest.origin.x as f32, -dest.origin.y as f32) @@ -239,7 +239,7 @@ impl GenericDrawTarget for raqote::DrawTarget { src.size.height as f32 / dest.size.height as f32, ); - self.set_transform(&transform); + self.set_transform(&transform.cast()); let dest = dest.cast(); let mut pb = raqote::PathBuilder::new(); pb.rect( @@ -280,9 +280,9 @@ impl GenericDrawTarget for raqote::DrawTarget { fill_rule: FillRule, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { - self.set_transform(&transform); + self.set_transform(&transform.cast()); let draw_options = draw_options(composition_options); let pattern = style.to_raqote_pattern(); let mut path = to_path(path); @@ -299,9 +299,9 @@ impl GenericDrawTarget for raqote::DrawTarget { start: Point2D, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { - self.set_transform(&transform); + self.set_transform(&transform.cast()); let draw_options = draw_options(composition_options); let pattern = style.to_raqote_pattern(); let mut advance = 0.; @@ -362,7 +362,7 @@ impl GenericDrawTarget for raqote::DrawTarget { rect: &Rect, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { let rect = rect.cast(); let mut pb = canvas_traits::canvas::Path::new(); @@ -392,9 +392,9 @@ impl GenericDrawTarget for raqote::DrawTarget { &mut self, path: &canvas_traits::canvas::Path, fill_rule: FillRule, - transform: Transform2D, + transform: Transform2D, ) { - self.set_transform(&transform); + self.set_transform(&transform.cast()); let mut path = to_path(path); path.winding = match fill_rule { FillRule::Nonzero => raqote::Winding::NonZero, @@ -414,11 +414,11 @@ impl GenericDrawTarget for raqote::DrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { let pattern = style.to_raqote_pattern(); let options = draw_options(composition_options); - self.set_transform(&transform); + self.set_transform(&transform.cast()); self.stroke( &to_path(path), &source(&pattern), @@ -432,9 +432,9 @@ impl GenericDrawTarget for raqote::DrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { - self.set_transform(&transform); + self.set_transform(&transform.cast()); let pattern = style.to_raqote_pattern(); let options = draw_options(composition_options); let mut pb = raqote::PathBuilder::new(); diff --git a/components/canvas/vello_backend.rs b/components/canvas/vello_backend.rs index 5c8f745c0b3..21546755fb6 100644 --- a/components/canvas/vello_backend.rs +++ b/components/canvas/vello_backend.rs @@ -169,8 +169,8 @@ impl VelloDrawTarget { } } - fn is_viewport_cleared(&mut self, rect: &Rect, transform: Transform2D) -> bool { - let transformed_rect = transform.outer_transformed_rect(rect); + fn is_viewport_cleared(&mut self, rect: &Rect, transform: Transform2D) -> bool { + let transformed_rect = transform.outer_transformed_rect(&rect.cast()); if transformed_rect.is_empty() { return false; } @@ -239,7 +239,7 @@ impl GenericDrawTarget for VelloDrawTarget { Self::new_with_renderer(device, queue, Rc::new(RefCell::new(renderer)), size) } - fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { + fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { // vello scene only ever grows, // so we use every opportunity to shrink it if self.is_viewport_cleared(rect, transform) { @@ -250,7 +250,7 @@ impl GenericDrawTarget for VelloDrawTarget { } self.ensure_drawing(); let rect: kurbo::Rect = rect.cast().into(); - let transform = transform.cast().into(); + let transform = transform.into(); self.scene .push_layer(peniko::Compose::Clear, 0.0, transform, &rect); self.scene.fill( @@ -310,7 +310,7 @@ impl GenericDrawTarget for VelloDrawTarget { source: Rect, filter: Filter, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); let scale_up = dest.size.width > source.size.width || dest.size.height > source.size.height; @@ -367,7 +367,7 @@ impl GenericDrawTarget for VelloDrawTarget { fill_rule: FillRule, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.with_composition(composition_options.composition_operation, |self_| { @@ -387,7 +387,7 @@ impl GenericDrawTarget for VelloDrawTarget { start: Point2D, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); let pattern = convert_to_brush(style, composition_options); @@ -448,7 +448,7 @@ impl GenericDrawTarget for VelloDrawTarget { rect: &Rect, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); let pattern = convert_to_brush(style, composition_options); @@ -471,7 +471,7 @@ impl GenericDrawTarget for VelloDrawTarget { } } - fn push_clip(&mut self, path: &Path, _fill_rule: FillRule, transform: Transform2D) { + fn push_clip(&mut self, path: &Path, _fill_rule: FillRule, transform: Transform2D) { self.scene .push_layer(peniko::Mix::Clip, 1.0, transform.cast().into(), &path.0); let mut path = path.clone(); @@ -497,7 +497,7 @@ impl GenericDrawTarget for VelloDrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.with_composition(composition_options.composition_operation, |self_| { @@ -517,7 +517,7 @@ impl GenericDrawTarget for VelloDrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); let rect: kurbo::Rect = rect.cast().into(); diff --git a/components/canvas/vello_cpu_backend.rs b/components/canvas/vello_cpu_backend.rs index 6074e85a935..d995527cd8f 100644 --- a/components/canvas/vello_cpu_backend.rs +++ b/components/canvas/vello_cpu_backend.rs @@ -126,8 +126,8 @@ impl VelloCPUDrawTarget { Size2D::new(self.ctx.width(), self.ctx.height()).cast() } - fn is_viewport_cleared(&mut self, rect: &Rect, transform: Transform2D) -> bool { - let transformed_rect = transform.outer_transformed_rect(rect); + fn is_viewport_cleared(&mut self, rect: &Rect, transform: Transform2D) -> bool { + let transformed_rect = transform.outer_transformed_rect(&rect.cast()); if transformed_rect.is_empty() { return false; } @@ -156,7 +156,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { } } - fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { + fn clear_rect(&mut self, rect: &Rect, transform: Transform2D) { // vello_cpu RenderingContext only ever grows, // so we need to use every opportunity to shrink it if self.is_viewport_cleared(rect, transform) { @@ -217,7 +217,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { source: Rect, filter: Filter, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); let scale_up = dest.size.width > source.size.width || dest.size.height > source.size.height; @@ -272,7 +272,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { fill_rule: FillRule, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.with_composition(composition_options.composition_operation, |self_| { @@ -290,7 +290,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { start: Point2D, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.ctx.set_paint(paint(style, composition_options.alpha)); @@ -348,7 +348,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { rect: &Rect, style: FillOrStrokeStyle, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.with_composition(composition_options.composition_operation, |self_| { @@ -368,7 +368,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { } } - fn push_clip(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D) { + fn push_clip(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D) { self.ctx.set_transform(transform.cast().into()); let mut path = path.clone(); path.transform(transform.cast()); @@ -396,7 +396,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.with_composition(composition_options.composition_operation, |self_| { @@ -413,7 +413,7 @@ impl GenericDrawTarget for VelloCPUDrawTarget { style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, - transform: Transform2D, + transform: Transform2D, ) { self.ensure_drawing(); self.with_composition(composition_options.composition_operation, |self_| { diff --git a/components/script/canvas_state.rs b/components/script/canvas_state.rs index b3174e7fee0..cd03a75d524 100644 --- a/components/script/canvas_state.rs +++ b/components/script/canvas_state.rs @@ -105,7 +105,7 @@ pub(crate) struct CanvasContextState { line_dash: Vec, line_dash_offset: f64, #[no_trace] - transform: Transform2D, + transform: Transform2D, shadow_offset_x: f64, shadow_offset_y: f64, shadow_blur: f64, @@ -1005,7 +1005,7 @@ impl CanvasState { (source_rect, dest_rect) } - fn update_transform(&self, transform: Transform2D) { + fn update_transform(&self, transform: Transform2D) { let mut state = self.state.borrow_mut(); self.current_default_path .borrow_mut() @@ -1991,7 +1991,7 @@ impl CanvasState { } let transform = self.state.borrow().transform; - self.update_transform(transform.pre_scale(x as f32, y as f32)) + self.update_transform(transform.pre_scale(x, y)) } // https://html.spec.whatwg.org/multipage/#dom-context-2d-rotate @@ -2002,10 +2002,7 @@ impl CanvasState { let (sin, cos) = (angle.sin(), angle.cos()); let transform = self.state.borrow().transform; - self.update_transform( - Transform2D::new(cos as f32, sin as f32, -sin as f32, cos as f32, 0.0, 0.0) - .then(&transform), - ) + self.update_transform(Transform2D::new(cos, sin, -sin, cos, 0.0, 0.0).then(&transform)) } // https://html.spec.whatwg.org/multipage/#dom-context-2d-translate @@ -2015,7 +2012,7 @@ impl CanvasState { } let transform = self.state.borrow().transform; - self.update_transform(transform.pre_translate(vec2(x as f32, y as f32))) + self.update_transform(transform.pre_translate(vec2(x, y))) } // https://html.spec.whatwg.org/multipage/#dom-context-2d-transform @@ -2031,16 +2028,13 @@ impl CanvasState { } let transform = self.state.borrow().transform; - self.update_transform( - Transform2D::new(a as f32, b as f32, c as f32, d as f32, e as f32, f as f32) - .then(&transform), - ) + self.update_transform(Transform2D::new(a, b, c, d, e, f).then(&transform)) } // https://html.spec.whatwg.org/multipage/#dom-context-2d-gettransform pub(crate) fn get_transform(&self, global: &GlobalScope, can_gc: CanGc) -> DomRoot { let transform = self.state.borrow_mut().transform; - DOMMatrix::new(global, true, transform.cast::().to_3d(), can_gc) + DOMMatrix::new(global, true, transform.to_3d(), can_gc) } /// @@ -2057,9 +2051,7 @@ impl CanvasState { } // Step 2. Reset the current transformation matrix to the matrix described by: - self.update_transform(Transform2D::new( - a as f32, b as f32, c as f32, d as f32, e as f32, f as f32, - )) + self.update_transform(Transform2D::new(a, b, c, d, e, f)) } /// diff --git a/components/shared/canvas/canvas.rs b/components/shared/canvas/canvas.rs index 51a87cbc7e7..dee96f14e41 100644 --- a/components/shared/canvas/canvas.rs +++ b/components/shared/canvas/canvas.rs @@ -462,7 +462,7 @@ pub enum Canvas2dMsg { bool, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), DrawEmptyImage( Size2D, @@ -470,7 +470,7 @@ pub enum Canvas2dMsg { Rect, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), DrawImageInOther( CanvasId, @@ -479,10 +479,10 @@ pub enum Canvas2dMsg { bool, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), - ClearRect(Rect, Transform2D), - ClipPath(Path, FillRule, Transform2D), + ClearRect(Rect, Transform2D), + ClipPath(Path, FillRule, Transform2D), PopClips(usize), FillPath( FillOrStrokeStyle, @@ -490,7 +490,7 @@ pub enum Canvas2dMsg { FillRule, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), FillText( String, @@ -502,14 +502,14 @@ pub enum Canvas2dMsg { TextOptions, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), FillRect( Rect, FillOrStrokeStyle, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), GetImageData(Option>, IpcSender), MeasureText(String, IpcSender, TextOptions), @@ -520,7 +520,7 @@ pub enum Canvas2dMsg { LineOptions, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), StrokePath( Path, @@ -528,7 +528,7 @@ pub enum Canvas2dMsg { LineOptions, ShadowOptions, CompositionOptions, - Transform2D, + Transform2D, ), UpdateImage(IpcSender<()>), }