tableimg

package
v0.0.0-...-16cd069 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRowLen = 20 // 最大行长度(字符)

	FontSize = 12.5

	RowMaxLen = 15
	ColMaxLen = 26

	BorderSize = 3
)

Variables

This section is empty.

Functions

func SetColor4Img

func SetColor4Img(img *image.RGBA, x, y, wight, high int, color drawing.Color)

func SetText4Img

func SetText4Img(img *image.RGBA, x, y int, label string, color drawing.Color)

Types

type Record

type Record struct {
	BgColor drawing.Color
	FgColor drawing.Color
	Text    string
}

func Debug

func Debug(text string, args ...interface{}) Record

func Error

func Error(text string, args ...interface{}) Record

func Success

func Success(text string, args ...interface{}) Record

func Warn

func Warn(text string, args ...interface{}) Record

type TableImg

type TableImg struct {
	BgColor drawing.Color

	Data [][]Record

	Wight, High int
}

func NewTableImg

func NewTableImg() *TableImg

func (*TableImg) AddLine

func (p *TableImg) AddLine(line []Record) *TableImg

func (*TableImg) ToExcel

func (p *TableImg) ToExcel() io.Reader

func (*TableImg) ToImg

func (p *TableImg) ToImg() io.Reader

ToImg col 列 row 行

Jump to

Keyboard shortcuts

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