mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
gesture,widget,f32: [API] use integer coordinates for gesture coordinates
Most widget code operate in integer coordinates. This change makes gesture pointer coordinates integer, to lessen the number of float32 to int conversions. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-2
@@ -6,7 +6,6 @@ import (
|
||||
"image"
|
||||
"time"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/gesture"
|
||||
"gioui.org/io/key"
|
||||
"gioui.org/io/pointer"
|
||||
@@ -39,7 +38,7 @@ type Click struct {
|
||||
// Press represents a past pointer press.
|
||||
type Press struct {
|
||||
// Position of the press.
|
||||
Position f32.Point
|
||||
Position image.Point
|
||||
// Start is when the press began.
|
||||
Start time.Time
|
||||
// End is when the press was ended by a release or cancel.
|
||||
|
||||
Reference in New Issue
Block a user