Rename Rectangle::round to snap
Also use `ceil` instead of `round`. Closes #380.
This commit is contained in:
parent
b96d87ff69
commit
94af348846
5 changed files with 8 additions and 9 deletions
|
|
@ -105,7 +105,7 @@ impl Backend {
|
|||
target_width: u32,
|
||||
target_height: u32,
|
||||
) {
|
||||
let bounds = (layer.bounds * scale_factor).round();
|
||||
let bounds = (layer.bounds * scale_factor).snap();
|
||||
|
||||
if !layer.quads.is_empty() {
|
||||
self.quad_pipeline.draw(
|
||||
|
|
|
|||
|
|
@ -326,8 +326,7 @@ impl Pipeline {
|
|||
for (i, (vertex_offset, index_offset, indices)) in
|
||||
offsets.into_iter().enumerate()
|
||||
{
|
||||
let clip_bounds =
|
||||
(meshes[i].clip_bounds * scale_factor).round();
|
||||
let clip_bounds = (meshes[i].clip_bounds * scale_factor).snap();
|
||||
|
||||
render_pass.set_scissor_rect(
|
||||
clip_bounds.x,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue