xavatar

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Avatar

type Avatar interface {
	Image(char string) (image.Image, error)
	Generate(char string) (image.Image, error)
	Save(char, fpath string) error
}

Avatar ...

func New

func New(options ...Option) Avatar

New ...

type Option

type Option func(o *option)

Option ...

func WithBlockNum

func WithBlockNum(blockNum int) Option

WithBlockNum 设置方块数量

func WithRadious

func WithRadious(radious float64) Option

WithRadious 设置圆角

func WithSize

func WithSize(size int) Option

WithSize 设置尺寸

func WithStyle

func WithStyle(style Style) Option

WithStyle 设置绘制样式

type Style

type Style int

Style ...

const (
	StyleLetter Style = iota
	StyleSquare
	StylePornhub
)

func (Style) String

func (t Style) String() string

Jump to

Keyboard shortcuts

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