io/pointer: unify area ops into a single AreaOp

Make Rect and Ellipse constructors of AreaOp.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-18 14:59:50 +01:00
parent 3edd9dd8be
commit 16cc51ee8a
6 changed files with 21 additions and 33 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ For example, to set up a rectangular hit area:
var h *Handler = ...
r := image.Rectangle{...}
pointer.RectAreaOp{Rect: r}.Add(ops)
pointer.Rect().Add(ops)
pointer.InputOp{Key: h}.Add(ops)
Note that areas compound: the effective area of multiple area