mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
op/clip: add Rect.Add shorthand
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -317,6 +317,11 @@ func (rr Rect) Op(ops *op.Ops) Op {
|
||||
return roundRect(ops, r, rr.SE, rr.SW, rr.NW, rr.NE)
|
||||
}
|
||||
|
||||
// Add is a shorthand for Op(ops).Add(ops).
|
||||
func (rr Rect) Add(ops *op.Ops) {
|
||||
rr.Op(ops).Add(ops)
|
||||
}
|
||||
|
||||
// roundRect returns the clip area of a rectangle with rounded
|
||||
// corners defined by their radii.
|
||||
func roundRect(ops *op.Ops, r f32.Rectangle, se, sw, nw, ne float32) Op {
|
||||
|
||||
Reference in New Issue
Block a user