Documentation
¶
Overview ¶
Package avatar implements a 5x5 block avatar image creation.
Example Usage
import "github.com/gitzart/identicon/avatar" a := new(avatar.Avatar) a.Text = "sometext" m, _ := a.Create()
The output is "image.Image" type.
Further image processing can be done by using the helper functions provided in "github.com/gitzart/identicon" package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBG = color.NRGBA{0xed, 0xed, 0xed, 0xff}
DefaultBG is the default image background color.
Functions ¶
This section is empty.
Types ¶
type Avatar ¶
type Avatar struct {
// Case insensitive text
Text string
// Non-zero positive image size
Size int
// The value is in percentage. Ranges from 0 to 10.
// Off limits values will be clipped.
Padding int
// Customizable avatar colors
BGColor color.NRGBA
Color color.NRGBA
// contains filtered or unexported fields
}
Avatar defines the properties to make an avatar image.
Click to show internal directories.
Click to hide internal directories.