mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
op: rename StackOp/Push/Pop to StateOp/Save/Load
The semantics were relaxed in a previous commit; this change renames to operations accordingly. API change. Use gofmt to adjust your code accordingly: gofmt -r 'op.Push(a).Pop() -> op.Save(a).Load()' gofmt -r 'op.Push(a) -> op.Save(a)' gofmt -r 'v.Pop() -> v.Load()' gofmt -r 'op.StackOp -> op.StateOp' Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -139,7 +139,7 @@ func (d PaintOp) Add(o *op.Ops) {
|
||||
|
||||
// FillShape fills the clip shape with a color.
|
||||
func FillShape(ops *op.Ops, c color.NRGBA, shape clip.Op) {
|
||||
defer op.Push(ops).Pop()
|
||||
defer op.Save(ops).Load()
|
||||
shape.Add(ops)
|
||||
Fill(ops, c)
|
||||
}
|
||||
@@ -149,7 +149,7 @@ func FillShape(ops *op.Ops, c color.NRGBA, shape clip.Op) {
|
||||
// the painted area. Use FillShape unless you need to paint several
|
||||
// times within the same clip.Op.
|
||||
func Fill(ops *op.Ops, c color.NRGBA) {
|
||||
defer op.Push(ops).Pop()
|
||||
defer op.Save(ops).Load()
|
||||
ColorOp{Color: c}.Add(ops)
|
||||
PaintOp{}.Add(ops)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user