Adds linear gradient support to 2D meshes in the canvas widget.
This commit is contained in:
parent
97f385e093
commit
40f45d7b7e
40 changed files with 2041 additions and 655 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue