Adds linear gradient support to 2D meshes in the canvas widget.

This commit is contained in:
shan 2022-09-29 10:52:58 -07:00
parent 97f385e093
commit 40f45d7b7e
40 changed files with 2041 additions and 655 deletions

View file

@ -1,7 +1,6 @@
use crate::program;
use crate::{program, triangle};
use crate::quad;
use crate::text;
use crate::triangle;
use crate::{Settings, Transformation, Viewport};
use iced_graphics::backend;
@ -100,16 +99,16 @@ impl Backend {
);
}
if !layer.meshes.is_empty() {
if !layer.meshes.0.is_empty() {
let scaled = transformation
* Transformation::scale(scale_factor, scale_factor);
self.triangle_pipeline.draw(
&layer.meshes,
gl,
target_height,
scaled,
scale_factor,
&layer.meshes,
);
}