mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +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:
@@ -36,7 +36,7 @@ func (l LoaderStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
}
|
||||
sz := gtx.Constraints.Constrain(image.Pt(diam, diam))
|
||||
radius := float64(sz.X) * .5
|
||||
defer op.Push(gtx.Ops).Pop()
|
||||
defer op.Save(gtx.Ops).Load()
|
||||
op.Offset(f32.Pt(float32(radius), float32(radius))).Add(gtx.Ops)
|
||||
|
||||
dt := (time.Duration(gtx.Now.UnixNano()) % (time.Second)).Seconds()
|
||||
|
||||
Reference in New Issue
Block a user