https://github.com/notwithering/canvas
⚠️ DEPRECATED ⚠️
https://github.com/notwithering/canvas
Last synced: 6 months ago
JSON representation
⚠️ DEPRECATED ⚠️
- Host: GitHub
- URL: https://github.com/notwithering/canvas
- Owner: notwithering
- License: mit
- Archived: true
- Created: 2024-01-03T09:42:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T20:33:41.000Z (over 1 year ago)
- Last Synced: 2024-10-30T21:27:17.628Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚠️ DEPRECATED ⚠️
This package is severely broken and horribly slow. Here's a less horrible and much faster package I recently made: https://github.com/notwithering/blocky
---
# Canvas [](https://github.com/notwithering/canvas/blob/master/LICENSE)
**Canvas** is a simple go package that provides functions to help you create and display canvases in the terminal.
### Contents
- [Example](#example)
## Example

```go
package main
import (
"fmt"
"image/color"
"github.com/notwithering/canvas"
)
func main() {
myCanvas := canvas.New(7, 3)
myCanvas = canvas.Fill(myCanvas, color.Transparent)
myCanvas[0][0] = color.RGBA{255, 85, 85, 255}
myCanvas[0][1] = color.RGBA{255, 85, 85, 255}
myCanvas[0][2] = color.RGBA{255, 85, 85, 255}
myCanvas[1][1] = color.RGBA{255, 85, 85, 255}
myCanvas[2][0] = color.RGBA{255, 85, 85, 255}
myCanvas[2][1] = color.RGBA{255, 85, 85, 255}
myCanvas[2][2] = color.RGBA{255, 85, 85, 255}
myCanvas[4][0] = color.RGBA{255, 85, 85, 255}
myCanvas[5][0] = color.RGBA{255, 85, 85, 255}
myCanvas[6][0] = color.RGBA{255, 85, 85, 255}
myCanvas[5][1] = color.RGBA{255, 85, 85, 255}
myCanvas[4][2] = color.RGBA{255, 85, 85, 255}
myCanvas[5][2] = color.RGBA{255, 85, 85, 255}
myCanvas[6][2] = color.RGBA{255, 85, 85, 255}
me := canvas.Text(myCanvas)
fmt.Println(me)
}
```