Implement clipping for quads

This commit is contained in:
Héctor Ramón Jiménez 2019-10-27 03:10:49 +01:00
parent e21890168f
commit 21eb2f692c
2 changed files with 10 additions and 1 deletions

View file

@ -251,7 +251,7 @@ impl Renderer {
border_radius,
} => {
layer.quads.push(Quad {
position: [bounds.x, bounds.y],
position: [bounds.x, bounds.y - layer.y_offset as f32],
scale: [bounds.width, bounds.height],
color: match background {
Background::Color(color) => color.into_linear(),
@ -304,6 +304,7 @@ impl Renderer {
encoder,
&layer.quads,
transformation,
layer.bounds,
target,
);