mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
app,os: update documentation to match changed API
Updates gio#61 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ For example:
|
|||||||
// Add operations to ops.
|
// Add operations to ops.
|
||||||
...
|
...
|
||||||
// Completely replace the window contents and state.
|
// Completely replace the window contents and state.
|
||||||
w.Update(ops)
|
e.Frame(ops)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,12 +20,13 @@ Drawing a colored square:
|
|||||||
import "gioui.org/op/paint"
|
import "gioui.org/op/paint"
|
||||||
|
|
||||||
var w app.Window
|
var w app.Window
|
||||||
|
var e system.FrameEvent
|
||||||
ops := new(op.Ops)
|
ops := new(op.Ops)
|
||||||
...
|
...
|
||||||
ops.Reset()
|
ops.Reset()
|
||||||
paint.ColorOp{Color: ...}.Add(ops)
|
paint.ColorOp{Color: ...}.Add(ops)
|
||||||
paint.PaintOp{Rect: ...}.Add(ops)
|
paint.PaintOp{Rect: ...}.Add(ops)
|
||||||
w.Update(ops)
|
e.Frame(ops)
|
||||||
|
|
||||||
State
|
State
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user