Floor layer coords to avoid excessive clipping
This commit is contained in:
parent
8074bca8a0
commit
904818ccb0
1 changed files with 2 additions and 2 deletions
|
|
@ -265,8 +265,8 @@ impl Renderer {
|
||||||
if width > 0.0 && height > 0.0 {
|
if width > 0.0 && height > 0.0 {
|
||||||
let clip_layer = Layer::new(
|
let clip_layer = Layer::new(
|
||||||
Rectangle {
|
Rectangle {
|
||||||
x: x.max(0.0).ceil() as u32,
|
x: x.max(0.0).floor() as u32,
|
||||||
y: y.max(0.0).ceil() as u32,
|
y: y.max(0.0).floor() as u32,
|
||||||
width: width.ceil() as u32,
|
width: width.ceil() as u32,
|
||||||
height: height.ceil() as u32,
|
height: height.ceil() as u32,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue