diff options
author | 2022-09-29 10:52:58 -0700 | |
---|---|---|
committer | 2022-09-29 10:52:58 -0700 | |
commit | 00a8a167122301983753a2f4b43d136c79a7d5cb (patch) | |
tree | 99596e40da4150eab2d9e862d84373fcf02a548d /wgpu/src/backend.rs | |
parent | 97f385e093711c269df315b28f76e66e0220e22a (diff) | |
download | iced-00a8a167122301983753a2f4b43d136c79a7d5cb.tar.gz iced-00a8a167122301983753a2f4b43d136c79a7d5cb.tar.bz2 iced-00a8a167122301983753a2f4b43d136c79a7d5cb.zip |
Adds linear gradient support to 2D meshes in the canvas widget.
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/backend.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index 8c875254..fd688004 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -94,8 +94,7 @@ impl Backend { staging_belt, encoder, frame, - target_size.width, - target_size.height, + target_size ); } @@ -112,8 +111,7 @@ impl Backend { staging_belt: &mut wgpu::util::StagingBelt, encoder: &mut wgpu::CommandEncoder, target: &wgpu::TextureView, - target_width: u32, - target_height: u32, + target_size: Size<u32>, ) { let bounds = (layer.bounds * scale_factor).snap(); @@ -134,7 +132,7 @@ impl Backend { ); } - if !layer.meshes.is_empty() { + if !layer.meshes.0.is_empty() { let scaled = transformation * Transformation::scale(scale_factor, scale_factor); @@ -143,8 +141,7 @@ impl Backend { staging_belt, encoder, target, - target_width, - target_height, + target_size, scaled, scale_factor, &layer.meshes, |