Versions in this module Expand all Collapse all v0 v0.2.0 Sep 10, 2026 v0.1.0 Sep 10, 2026 Changes in this version + const DefaultRenderer + const LogoRenderer + const Release + var ErrEmptyVersion = errors.New("blazon: empty version string") + var ErrSyntax = errors.New("blazon: invalid semantic version") + func EncodePNG(img image.Image) ([]byte, error) + func Image(version string, o Options) (*image.RGBA, error) + func ImageWith(r Renderer, version string, o Options) (*image.RGBA, error) + func MarkPrerelease(ctx *Context) + func MarkPrereleaseCells(ctx *Context, cols, row int) + func PNG(version string, o Options) ([]byte, error) + func Register(r Renderer) + func Renderers() []string + func SVG(version string, o Options) ([]byte, error) + func SVGWith(r Renderer, version string, o Options) ([]byte, error) + func Text(version string, o Options) (string, error) + func TextWith(r Renderer, version string, o Options) (string, error) + type Background int + const BackgroundDark + const BackgroundLight + const BackgroundTransparent + type BitReader struct + func NewBitReader(root [32]byte) *BitReader + func (b *BitReader) Bit() uint64 + func (b *BitReader) Bool() bool + func (b *BitReader) Choice(n int) int + func (b *BitReader) Derive(tag string) *BitReader + func (b *BitReader) Float01() float64 + func (b *BitReader) IntRange(lo, hi int) int + func (b *BitReader) LogRange(lo, hi float64) float64 + func (b *BitReader) Range(lo, hi float64) float64 + func (b *BitReader) Sign() float64 + func (b *BitReader) Uint(n uint) uint64 + type Box struct + H float64 + W float64 + X float64 + Y float64 + func (b Box) Center() (x, y float64) + func (b Box) Min() float64 + type Caps struct + ByteExact bool + GridCols int + GridRows int + Ordered bool + TextOnly bool + type Context struct + Box Box + Canvas canvas.Canvas + Options Options + Palette Palette + Params *Params + type Options struct + Background Background + Cols int + NoColor bool + Padding float64 + Palette PaletteMode + Policy Policy + Renderer string + Size int + type Palette struct + Ground color.RGBA + Inks []color.RGBA + func DerivePalette(p *Params, mode PaletteMode, bg Background) Palette + func (p Palette) Ink(i int) color.RGBA + type PaletteMode int + const PaletteColor + const PaletteMono + type Params struct + Policy Policy + Seed *Seed + func NewParams(s *Seed, p Policy) *Params + func (p *Params) Amplified() *BitReader + func (p *Params) Archetype() *BitReader + func (p *Params) Detail() *BitReader + func (p *Params) PaletteBase() *BitReader + func (p *Params) PaletteShift() *BitReader + func (p *Params) Pre() *BitReader + func (p *Params) Reset() + func (p *Params) Variant() *BitReader + func (p *Params) Version() Version + type Policy int + const PolicyFamily + const PolicyFamilyAmplified + const PolicyIndependent + func (p Policy) String() string + type Renderer interface + Caps func() Caps + Name func() string + Render func(ctx *Context) error + func Lookup(name string) (Renderer, bool) + type Seed struct + H0 [32]byte + H1 [32]byte + H2 [32]byte + H3 [32]byte + V Version + func NewSeed(v Version) *Seed + type Version struct + Build string + Major uint64 + Minor uint64 + Patch uint64 + Prerelease string + func ParseVersion(s string) (Version, error) + func (v Version) Core() Version + func (v Version) IsPrerelease() bool + func (v Version) String() string