aboutsummaryrefslogtreecommitdiff
path: root/unicorn
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-05-21 09:56:39 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-05-21 09:56:39 +0100
commit34f1a11454fc38a77338569f466df879fd1792f7 (patch)
treefb46544a8d8c42635b482267d6db46c0ab3c58d3 /unicorn
parent32e997346bb5766aefa6ef5f4caa189af128b498 (diff)
downloadunicornpaint-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.go2
-rw-r--r--unicorn/Unicorn.go2
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]
}