aboutsummaryrefslogtreecommitdiffstats
path: root/examples/paint
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-02-25 18:22:31 -0500
committerSam Anthony <sam@samanthony.xyz>2026-02-25 18:22:31 -0500
commit7ed10a4fc3c95244d347aa313f0d334aab962f80 (patch)
tree9f1e1806c87ac7de22d6abe5696f30aff2f8da2d /examples/paint
parent63095aa509e2e3ce113a2681db520d2961284f71 (diff)
downloadgui-7ed10a4fc3c95244d347aa313f0d334aab962f80.zip
update examples to use new Env interface
Diffstat (limited to 'examples/paint')
-rw-r--r--examples/paint/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/paint/main.go b/examples/paint/main.go
index fec06c3..7aa0179 100644
--- a/examples/paint/main.go
+++ b/examples/paint/main.go
@@ -26,7 +26,7 @@ func ColorPicker(env gui.Env, pick chan<- color.Color, r image.Rectangle, clr co
}
}
- close(env.Draw())
+ env.Close()
}
func Canvas(env gui.Env, pick <-chan color.Color, r image.Rectangle) {
@@ -51,7 +51,7 @@ func Canvas(env gui.Env, pick <-chan color.Color, r image.Rectangle) {
case event, ok := <-env.Events():
if !ok {
- close(env.Draw())
+ env.Close()
return
}
@@ -118,7 +118,7 @@ func run() {
for event := range env.Events() {
switch event.(type) {
case win.WiClose:
- close(env.Draw())
+ env.Close()
}
}
}