Rename Rectangle::round to snap

Also use `ceil` instead of `round`.
Closes #380.
This commit is contained in:
Héctor Ramón Jiménez 2020-06-02 04:38:55 +02:00
parent b96d87ff69
commit 94af348846
5 changed files with 8 additions and 9 deletions

View file

@ -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() {

View file

@ -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 {