mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
io/router: cleanup
Remove unused function and func argument. Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
|
||||||
"image"
|
"image"
|
||||||
|
|
||||||
"gioui.org/f32"
|
"gioui.org/f32"
|
||||||
@@ -218,7 +217,7 @@ func (q *pointerQueue) opHit(handlers *[]event.Tag, pos f32.Point) {
|
|||||||
idx := len(q.hitTree) - 1
|
idx := len(q.hitTree) - 1
|
||||||
for idx >= 0 {
|
for idx >= 0 {
|
||||||
n := &q.hitTree[idx]
|
n := &q.hitTree[idx]
|
||||||
hit := q.hit(n.area, pos, n.pass)
|
hit := q.hit(n.area, pos)
|
||||||
if !hit {
|
if !hit {
|
||||||
idx--
|
idx--
|
||||||
continue
|
continue
|
||||||
@@ -244,7 +243,7 @@ func (q *pointerQueue) invTransform(areaIdx int, p f32.Point) f32.Point {
|
|||||||
return q.areas[areaIdx].trans.Invert().Transform(p)
|
return q.areas[areaIdx].trans.Invert().Transform(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *pointerQueue) hit(areaIdx int, p f32.Point, pass bool) bool {
|
func (q *pointerQueue) hit(areaIdx int, p f32.Point) bool {
|
||||||
for areaIdx != -1 {
|
for areaIdx != -1 {
|
||||||
a := &q.areas[areaIdx]
|
a := &q.areas[areaIdx]
|
||||||
p := a.trans.Invert().Transform(p)
|
p := a.trans.Invert().Transform(p)
|
||||||
@@ -492,10 +491,6 @@ func addHandler(tags []event.Tag, tag event.Tag) []event.Tag {
|
|||||||
return append(tags, tag)
|
return append(tags, tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
func opDecodeFloat32(d []byte) float32 {
|
|
||||||
return float32(int32(binary.LittleEndian.Uint32(d)))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (op *areaOp) Hit(pos f32.Point) bool {
|
func (op *areaOp) Hit(pos f32.Point) bool {
|
||||||
pos = pos.Sub(op.rect.Min)
|
pos = pos.Sub(op.rect.Min)
|
||||||
size := op.rect.Size()
|
size := op.rect.Size()
|
||||||
|
|||||||
Reference in New Issue
Block a user