diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-07-17 23:31:07 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-07-17 23:31:07 -0400 |
commit | 1fd83f1656b0e16366c0cbaa98e5fc802238f022 (patch) | |
tree | 528af35d242146bc9928cd9387daa349a081cd98 /main.go | |
parent | 3d6f05e213247faf41cdebec01016cd99e7ededd (diff) |
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -54,11 +54,9 @@ func mkPixelStack(top, bot pixel) string { case noTop && noBot: return " " case noTop: - return fmt.Sprintf(botFmt+postFmt, - bot.r, bot.g, bot.b) + return fmt.Sprintf(botFmt+postFmt, bot.r, bot.g, bot.b) case noBot: - return fmt.Sprintf(topFmt+postFmt, - top.r, top.g, top.b) + return fmt.Sprintf(topFmt+postFmt, top.r, top.g, top.b) default: return fmt.Sprintf(topFmt+botFmt+postFmt, top.r, top.g, top.b, @@ -77,8 +75,7 @@ func (p pixelArt) draw(stream io.Writer) { if p.height%2 != 0 { for i := range top { - top[i] = pixel{0, 0, 0} - bot[i] = int2Pixel(p.pixels[0]) + top[i], bot[i] = pixel{0, 0, 0}, int2Pixel(p.pixels[0]) } drawRowStack(top, bot) topIdx += step |