Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

notwithering/canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ 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 MIT License

Canvas is a simple go package that provides functions to help you create and display canvases in the terminal.

Contents

Example

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)
}

About

⚠️ DEPRECATED ⚠️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages