mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
io/pointer,op/clip: remove clip.Circle, pointer.Rect, pointer.Ellipse
They've been deprecated for a while, and gio-x is updated to not use them. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user