io/router: use integer coordinates for bounds

There is no need for floating point coordinates, except for transforming
bounds and hit testing.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-03-30 12:08:48 +02:00
parent 1f11a5a17b
commit e72c46f13c
5 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func TestSemanticDescription(t *testing.T) {
Selected: true,
Disabled: true,
Gestures: ClickGesture,
Bounds: f32.Rectangle{Min: f32.Point{X: -1e+06, Y: -1e+06}, Max: f32.Point{X: 1e+06, Y: 1e+06}},
Bounds: image.Rectangle{Min: image.Point{X: -1e+06, Y: -1e+06}, Max: image.Point{X: 1e+06, Y: 1e+06}},
}
if got != exp {
t.Errorf("semantic description mismatch:\nGot: %+v\nWant: %+v", got, exp)