Try to align quad and image primitives in iced_wgpu
This commit is contained in:
parent
3aedbd5844
commit
15aa94c0f1
8 changed files with 28 additions and 44 deletions
|
|
@ -250,11 +250,14 @@ impl Rectangle<f32> {
|
|||
return None;
|
||||
}
|
||||
|
||||
let x = (self.x + 0.01).round();
|
||||
let y = (self.y + 0.01).round();
|
||||
|
||||
Some(Rectangle {
|
||||
x: self.x as u32,
|
||||
y: self.y as u32,
|
||||
width,
|
||||
height,
|
||||
x: x as u32,
|
||||
y: y as u32,
|
||||
width: ((self.x + self.width + 0.01).round() - x) as u32,
|
||||
height: ((self.y + self.height + 0.01).round() - y) as u32,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue