mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +00:00
all: use new rectangle and point convenience functions
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user