ascgen

package
v0.0.0-...-548fb8d Latest Latest
Warning

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

Go to latest
Published: May 20, 2016 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConsoleColor

func GetConsoleColor(r, g, b uint32) (m int, fg ct.Color, fgl bool, bg ct.Color, bgl bool)

func Show

func Show(iw io.Writer, img image.Image, console Console)

将图片渲染到文字

func ShowColor

func ShowColor(iw io.Writer, img image.Image, console Console)

将图片渲染到文字(有颜色版)

func ShowFile

func ShowFile(iw io.Writer, r io.Reader, console Console, useColor, simple bool) (err error)

从文件读取

func ShowSimpleColor

func ShowSimpleColor(iw io.Writer, img image.Image, console Console)

将图片渲染到彩色文字

Types

type Console

type Console struct {
	FontW, FontH uint // 单个字符的像素大小 = 屏幕像素大小/字符行数
	ScreenW      uint // 屏幕能够显示的字符行数/列数
}

func (Console) Ratio

func (c Console) Ratio() float64

func (Console) Width

func (c Console) Width() uint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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