all: use new rectangle and point convenience functions

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-05-19 10:39:20 +02:00
parent d82eb8fc66
commit 013ea395b4
11 changed files with 26 additions and 46 deletions
+2 -1
View File
@@ -24,6 +24,7 @@ import (
"gioui.org/internal/ops"
"gioui.org/internal/path"
gunsafe "gioui.org/internal/unsafe"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/op/paint"
)
@@ -796,7 +797,7 @@ func (d *drawState) materialFor(cache *resourceCache, rect f32.Rectangle, off f3
m.material = materialTexture
dr := boundRectF(rect.Add(off))
sz := d.image.src.Bounds().Size()
sr := toRectF(d.image.rect)
sr := layout.FRect(d.image.rect)
if dx := float32(dr.Dx()); dx != 0 {
// Don't clip 1 px width sources.
if sdx := sr.Dx(); sdx > 1 {