From 21bf070472555f8820bbb26fdc08bd3a64bad0fc Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 15 Nov 2023 07:36:27 -0600 Subject: [PATCH] io/pointer: clarify the documentation for Event.Position Signed-off-by: Elias Naur --- io/pointer/pointer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/pointer/pointer.go b/io/pointer/pointer.go index ae734eeda..70b3fcebd 100644 --- a/io/pointer/pointer.go +++ b/io/pointer/pointer.go @@ -32,8 +32,10 @@ type Event struct { Time time.Duration // Buttons are the set of pressed mouse buttons for this event. Buttons Buttons - // Position is the position of the event, relative to - // the current transformation, as set by op.TransformOp. + // Position is the coordinates of the event in the local coordinate + // system of the receiving tag. The transformation from global window + // coordinates to local coordinates is performed by the inverse of + // the [gioui.org/op.TransformOp]s applied to the [InputOp]. Position f32.Point // Scroll is the scroll amount, if any. Scroll f32.Point