identicon

package
v0.0.0-...-4b27688 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rand

func Rand(seeds []byte) *rand.Rand

Rand returns a reference of rand.Rand giving seeds.

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

A Data provides to construct identicon.

func NewData

func NewData(b []byte) *Data

NewData returns a reference of Data.

func NewDataString

func NewDataString(str string) *Data

NewDataString returns a reference of Data.

func (Data) Color

func (d Data) Color() *image.Uniform

Color returns a reference of image.Uniform belonging to color.RGBA.

func (*Data) Draw

func (d *Data) Draw(img *image.RGBA) error

Draw draws identicon in img.

func (*Data) Encode

func (d *Data) Encode(w io.Writer) error

Encode writes the identicon image to w in PNG format.

Jump to

Keyboard shortcuts

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