draw

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FillLength = 224
View Source
const FontUrl = "https://raw.githubusercontent.com/hellflame/terminal_printer/" +
	"808004a7cd41b4383bfe6aa310c491c69d9b2556/fonts/"
View Source
const VERSION = "0.1.3"

Variables

View Source
var DefaultFonts = []string{"shuyan.ttf", "letter.ttf",
	"Haibaoyuanyuan.ttf", "fengyun.ttf"}
View Source
var DefaultHeight = 80
View Source
var DefaultWidth = 50
View Source
var FillBytes []int
View Source
var FontBase string
View Source
var IsShabby = false

Functions

func Clip

func Clip(img *image.Gray) image.Image

clip text image to right size for golang doesn't have any direct way to get render string size

func GeneratePixel

func GeneratePixel(img *image.Image, fillIndex int, colorCode int,
	reverse bool, grayMode bool, shadeCliff uint8) string

generate terminal string

func LoadImage

func LoadImage(imgPath string) image.Image

load image

func Text

func Text(text string, fontPath string) *image.Gray

render text with given font

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL