diff options
| author | 2020-06-02 04:38:55 +0200 | |
|---|---|---|
| committer | 2020-06-02 04:38:55 +0200 | |
| commit | 94af34884667e78e231fb1904ae3e9fa785c9a7a (patch) | |
| tree | 71114ed1cc30f6de74b2a1e16b0f7f42adb5b80d /glow/src | |
| parent | b96d87ff6917e7dc75178e4c623d20d577ef583f (diff) | |
| download | iced-94af34884667e78e231fb1904ae3e9fa785c9a7a.tar.gz iced-94af34884667e78e231fb1904ae3e9fa785c9a7a.tar.bz2 iced-94af34884667e78e231fb1904ae3e9fa785c9a7a.zip | |
Rename `Rectangle::round` to `snap`
Also use `ceil` instead of `round`.
Closes #380.
Diffstat (limited to '')
| -rw-r--r-- | glow/src/backend.rs | 2 | ||||
| -rw-r--r-- | glow/src/triangle.rs | 2 | 
2 files changed, 2 insertions, 2 deletions
| diff --git a/glow/src/backend.rs b/glow/src/backend.rs index 7939311c..882dd605 100644 --- a/glow/src/backend.rs +++ b/glow/src/backend.rs @@ -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() { diff --git a/glow/src/triangle.rs b/glow/src/triangle.rs index ee7faf83..eefd1c1f 100644 --- a/glow/src/triangle.rs +++ b/glow/src/triangle.rs @@ -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 { | 
