mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
op/clip: remove Op.Add
The Add method was a compatibility stop-gap. API change. Use clip.Op.Push and Pop the return value to explicitly mark the region affected by the clip operation. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -28,13 +28,6 @@ func (r Rect) Push(ops *op.Ops) Stack {
|
||||
return r.Op().Push(ops)
|
||||
}
|
||||
|
||||
// Add the rectangle clip to the clip state.
|
||||
//
|
||||
// Deprecated: use Push instead.
|
||||
func (r Rect) Add(ops *op.Ops) {
|
||||
r.Op().Add(ops)
|
||||
}
|
||||
|
||||
// UniformRRect returns an RRect with all corner radii set to the
|
||||
// provided radius.
|
||||
func UniformRRect(rect f32.Rectangle, radius float32) RRect {
|
||||
@@ -78,13 +71,6 @@ func (rr RRect) Push(ops *op.Ops) Stack {
|
||||
return rr.Op(ops).Push(ops)
|
||||
}
|
||||
|
||||
// Add the rectangle clip to the clip state.
|
||||
//
|
||||
// Deprecated: use Push instead.
|
||||
func (rr RRect) Add(ops *op.Ops) {
|
||||
rr.Op(ops).Add(ops)
|
||||
}
|
||||
|
||||
// Path returns the PathSpec for the rounded rectangle.
|
||||
func (rr RRect) Path(ops *op.Ops) PathSpec {
|
||||
var p Path
|
||||
@@ -138,13 +124,6 @@ func (c Circle) Push(ops *op.Ops) Stack {
|
||||
return c.Op(ops).Push(ops)
|
||||
}
|
||||
|
||||
// Add the circle clip to the clip state.
|
||||
//
|
||||
// Deprecated: use Push instead.
|
||||
func (c Circle) Add(ops *op.Ops) {
|
||||
c.Op(ops).Add(ops)
|
||||
}
|
||||
|
||||
// Path returns the PathSpec for the circle.
|
||||
func (c Circle) Path(ops *op.Ops) PathSpec {
|
||||
var p Path
|
||||
|
||||
Reference in New Issue
Block a user