diff --git a/io/pointer/pointer.go b/io/pointer/pointer.go index 476878f5..97987f7c 100644 --- a/io/pointer/pointer.go +++ b/io/pointer/pointer.go @@ -14,7 +14,6 @@ import ( "gioui.org/io/event" "gioui.org/io/key" "gioui.org/op" - "gioui.org/op/clip" ) // Event is a pointer event. @@ -162,20 +161,6 @@ const ( ButtonTertiary ) -// Rect constructs a rectangular hit area. -// -// Deprecated: use clip.Rect instead. -func Rect(size image.Rectangle) clip.Op { - return clip.Rect(size).Op() -} - -// Ellipse constructs an ellipsoid hit area. -// -// Deprecated: use clip.Ellipse instead. -func Ellipse(size image.Rectangle) clip.Ellipse { - return clip.Ellipse(frect(size)) -} - // frect converts a rectangle to a f32.Rectangle. func frect(r image.Rectangle) f32.Rectangle { return f32.Rectangle{ diff --git a/op/clip/shapes.go b/op/clip/shapes.go index f361572b..30609e57 100644 --- a/op/clip/shapes.go +++ b/op/clip/shapes.go @@ -115,33 +115,6 @@ func (rr RRect) Path(ops *op.Ops) PathSpec { return p.End() } -// Circle represents the clip area of a circle. -type Circle struct { - Center f32.Point - Radius float32 -} - -// Op returns the op for the filled circle. -func (c Circle) Op(ops *op.Ops) Op { - return Outline{Path: c.Path(ops)}.Op() -} - -// Push the circle clip on the clip stack. -func (c Circle) Push(ops *op.Ops) Stack { - return c.Op(ops).Push(ops) -} - -// Path returns the PathSpec for the circle. -// -// Deprecated: use Ellipse instead. -func (c Circle) Path(ops *op.Ops) PathSpec { - b := f32.Rectangle{ - Min: f32.Pt(c.Center.X-c.Radius, c.Center.Y-c.Radius), - Max: f32.Pt(c.Center.X+c.Radius, c.Center.Y+c.Radius), - } - return Ellipse(b).Path(ops) -} - // Ellipse represents the largest axis-aligned ellipse that // is contained in its bounds. type Ellipse f32.Rectangle