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
|
|
@ -75,7 +75,7 @@ impl Backend {
|
|||
layer: &Layer<'_>,
|
||||
target_height: u32,
|
||||
) {
|
||||
let mut bounds = (layer.bounds * scale_factor).round();
|
||||
let mut bounds = (layer.bounds * scale_factor).snap();
|
||||
bounds.height = bounds.height.min(target_height);
|
||||
|
||||
if !layer.quads.is_empty() {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ impl Pipeline {
|
|||
let transform =
|
||||
transformation * Transformation::translate(origin.x, origin.y);
|
||||
|
||||
let clip_bounds = (*clip_bounds * scale_factor).round();
|
||||
let clip_bounds = (*clip_bounds * scale_factor).snap();
|
||||
|
||||
unsafe {
|
||||
if self.current_transform != transform {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue