Merge pull request #2975 from DKolter/issue_2963

Fix text bounds cutoff in `iced_wgpu`
This commit is contained in:
Héctor 2025-06-03 12:25:03 +02:00 committed by GitHub
commit c9cfd6fc17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -626,10 +626,10 @@ fn prepare(
scale: transformation.scale_factor()
* layer_transformation.scale_factor(),
bounds: cryoglyph::TextBounds {
left: clip_bounds.x as i32,
top: clip_bounds.y as i32,
right: (clip_bounds.x + clip_bounds.width) as i32,
bottom: (clip_bounds.y + clip_bounds.height) as i32,
left: clip_bounds.x.round() as i32,
top: clip_bounds.y.round() as i32,
right: (clip_bounds.x + clip_bounds.width).round() as i32,
bottom: (clip_bounds.y + clip_bounds.height).round() as i32,
},
default_color: to_color(color),
})