diff options
author | Martin Ashby <martin@martin-laptop.lan> | 2018-05-21 09:56:39 +0100 |
---|---|---|
committer | Martin Ashby <martin@martin-laptop.lan> | 2018-05-21 09:56:39 +0100 |
commit | 34f1a11454fc38a77338569f466df879fd1792f7 (patch) | |
tree | fb46544a8d8c42635b482267d6db46c0ab3c58d3 /unicorn | |
parent | 32e997346bb5766aefa6ef5f4caa189af128b498 (diff) | |
download | unicornpaint-34f1a11454fc38a77338569f466df879fd1792f7.tar.gz unicornpaint-34f1a11454fc38a77338569f466df879fd1792f7.tar.bz2 unicornpaint-34f1a11454fc38a77338569f466df879fd1792f7.tar.xz unicornpaint-34f1a11454fc38a77338569f466df879fd1792f7.zip |
Made Rgb function public
Diffstat (limited to 'unicorn')
-rw-r--r-- | unicorn/FakeUnicorn.go | 2 | ||||
-rw-r--r-- | unicorn/Unicorn.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/unicorn/FakeUnicorn.go b/unicorn/FakeUnicorn.go index 3236842..85833c9 100644 --- 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 index 09f712e..8a2b68d 100644 --- 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] } |