blade: Align rasterized path bounds to whole pixels (#16784)
Related: https://github.com/zed-industries/zed/pull/15822 | Before | After | | --- | --- | | |  | |  |  | Release Notes: - N/A
This commit is contained in:
parent
6afb36fd6f
commit
29745ae229
1 changed files with 5 additions and 1 deletions
|
@ -481,7 +481,11 @@ impl BladeRenderer {
|
|||
let mut vertices_by_texture_id = HashMap::default();
|
||||
|
||||
for path in paths {
|
||||
let clipped_bounds = path.bounds.intersect(&path.content_mask.bounds);
|
||||
let clipped_bounds = path
|
||||
.bounds
|
||||
.intersect(&path.content_mask.bounds)
|
||||
.map_origin(|origin| origin.floor())
|
||||
.map_size(|size| size.ceil());
|
||||
let tile = self.atlas.allocate_for_rendering(
|
||||
clipped_bounds.size.map(Into::into),
|
||||
AtlasTextureKind::Path,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue