From 80f48bc0b63c173eaa701229259edbb2e357dae0 Mon Sep 17 00:00:00 2001
From: faiface <faiface@ksp.sk>
Date: Sat, 15 Apr 2017 14:21:27 +0200
Subject: [PATCH] minor change in lights example code

---
 examples/lights/main.go | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/examples/lights/main.go b/examples/lights/main.go
index e16fd36..0ab4ba9 100644
--- a/examples/lights/main.go
+++ b/examples/lights/main.go
@@ -61,7 +61,7 @@ func (cl *colorlight) apply(src, noise drawer, dst pixel.ComposeTarget) {
 	// draw the light arc
 	dst.SetMatrix(pixel.IM.Scaled(0, cl.radius).Rotated(0, cl.angle).Moved(cl.point))
 	dst.SetColorMask(pixel.Alpha(1))
-	dst.SetComposeMethod(pixel.ComposeCopy)
+	dst.SetComposeMethod(pixel.ComposePlus)
 	cl.imd.Draw(dst)
 
 	// draw the noise inside the light
@@ -77,7 +77,7 @@ func (cl *colorlight) apply(src, noise drawer, dst pixel.ComposeTarget) {
 	// draw the light reflected from the dust
 	dst.SetMatrix(pixel.IM.Scaled(0, cl.radius).Rotated(0, cl.angle).Moved(cl.point))
 	dst.SetColorMask(cl.color.Mul(pixel.Alpha(cl.dust)))
-	dst.SetComposeMethod(pixel.ComposeOver)
+	dst.SetComposeMethod(pixel.ComposePlus)
 	cl.imd.Draw(dst)
 }
 
@@ -178,7 +178,7 @@ func run() {
 
 		// draw the panda visible outside the light
 		win.SetColorMask(pixel.Alpha(0.4))
-		win.SetComposeMethod(pixel.ComposeOver)
+		win.SetComposeMethod(pixel.ComposePlus)
 		panda.Draw(win)
 
 		allLight.Clear(pixel.Alpha(0))
@@ -193,7 +193,6 @@ func run() {
 
 		// compose the final result
 		win.SetColorMask(pixel.Alpha(1))
-		win.SetComposeMethod(pixel.ComposePlus)
 		allLight.Draw(win)
 
 		win.Update()
-- 
GitLab