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:
@@ -297,7 +297,7 @@ func drawInk(gtx layout.Context, c widget.Press) {
|
||||
ink := paint.ColorOp{Color: rgba}
|
||||
ink.Add(gtx.Ops)
|
||||
rr := size * .5
|
||||
defer op.Offset(c.Position.Add(f32.Point{
|
||||
defer op.Offset(layout.FPt(c.Position).Add(f32.Point{
|
||||
X: -rr,
|
||||
Y: -rr,
|
||||
})).Push(gtx.Ops).Pop()
|
||||
|
||||
Reference in New Issue
Block a user