summaryrefslogtreecommitdiffstats
path: root/wgpu/src/triangle.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-06-02 04:38:55 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-06-02 04:38:55 +0200
commit94af34884667e78e231fb1904ae3e9fa785c9a7a (patch)
tree71114ed1cc30f6de74b2a1e16b0f7f42adb5b80d /wgpu/src/triangle.rs
parentb96d87ff6917e7dc75178e4c623d20d577ef583f (diff)
downloadiced-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 'wgpu/src/triangle.rs')
-rw-r--r--wgpu/src/triangle.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs
index 22a27143..fe2388a3 100644
--- a/wgpu/src/triangle.rs
+++ b/wgpu/src/triangle.rs
@@ -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,