commit 34f1a11454fc38a77338569f466df879fd1792f7
parent 32e997346bb5766aefa6ef5f4caa189af128b498
Author: Martin Ashby <martin@martin-laptop.lan>
Date: Mon, 21 May 2018 09:56:39 +0100
Made Rgb function public
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/unicorn/FakeUnicorn.go b/unicorn/FakeUnicorn.go
@@ -74,7 +74,7 @@ func (f *FakeUnicorn) Show() {
width, height := f.GetWidth(), f.GetHeight()
for x := uint8(0); x < width; x++ {
for y := uint8(0); y < height; y++ {
- r, g, b := rgb(f.pixels[x][y])
+ r, g, b := Rgb(f.pixels[x][y])
if err := f.renderer.SetDrawColor(r, g, b, uint8(255)); err != nil {
panic(err)
}
diff --git a/unicorn/Unicorn.go b/unicorn/Unicorn.go
@@ -68,6 +68,6 @@ func makePixels(width, height uint8) [][][]uint8 {
return pixels
}
-func rgb(pixel []uint8) (uint8, uint8, uint8) {
+func Rgb(pixel []uint8) (uint8, uint8, uint8) {
return pixel[0], pixel[1], pixel[2]
}