Versions in this module Expand all Collapse all v0 v0.2.0 Aug 19, 2026 Changes in this version + const DefaultHRISize + const HRIFontMono + const HRIFontSans + const MaxHRISize + const MinHRISize + func HRIFonts() []string type Style + HRIFont string + HRISize float64 v0.1.0 Aug 17, 2026 Changes in this version + const BubbleTailModules + const CaptionBandModules + const DefaultFrameWidth + const DefaultLogoScale + const EyeCircle + const EyeLeaf + const EyeRounded + const EyeShield + const FrameBanner + const FrameBorder + const FrameBubble + const FrameNone + const FrameRounded + const MaxFrameWidth + const MaxLogoPadding + const MaxLogoScale + const MinLogoScale + const ShapeClassy + const ShapeDiamond + const ShapeDot + const ShapeHorizontal + const ShapeRounded + const ShapeSquare + const ShapeVertical + const StandardRenderer + var ErrInvalidColor = errors.New("invalid colour") + var ErrInvalidStyle = errors.New("invalid style") + var ErrUnknownRenderer = errors.New("unknown renderer") + var ErrUnknownShape = errors.New("unknown shape") + var Transparent = color.NRGBA + func ContrastRatio(fg, bg color.NRGBA) float64 + func EyeShapes() []string + func FrameKinds() []string + func HexColor(c color.NRGBA) string + func Luminance(c color.NRGBA) float64 + func ModuleShapes() []string + func ParseColor(s string) (color.NRGBA, error) + func ParseLogo(dataURI string) (image.Image, error) + func Register(r Renderer) + func RegisterEyeShape(p EyePainter) + func RegisterModuleShape(p ModulePainter) + type Canvas struct + Cols int + HRI string + Kind encoder.Kind + QuietZone int + Rows int + Style Style + Symbology string + func (c *Canvas) At(x, y int) bool + func (c *Canvas) Caption() string + func (c *Canvas) CaptionRect() (image.Rectangle, bool) + func (c *Canvas) ColorAt(x, y int) color.NRGBA + func (c *Canvas) Dark() int + func (c *Canvas) FrameRect() (image.Rectangle, bool) + func (c *Canvas) LogoRect() (image.Rectangle, bool) + func (c *Canvas) Role(x, y int) EyeRole + func (c *Canvas) SymbolRect() image.Rectangle + type EyePainter interface + Name func() string + RasterBall func(dst *image.NRGBA, r image.Rectangle, c color.NRGBA) + RasterFrame func(dst *image.NRGBA, r image.Rectangle, c color.NRGBA) + SVGBall func(x, y int) string + SVGFrame func(x, y int) string + func EyeShape(name string) (EyePainter, error) + type EyeRole uint8 + const RoleData + const RoleEyeBall + const RoleEyeFrame + type Frame struct + Caption string + CaptionColor color.NRGBA + Color color.NRGBA + Kind string + Width int + type Grade string + const GradeExcellent + const GradeGood + const GradeRisky + const GradeUnscannable + type Gradient struct + Angle float64 + Kind GradientKind + Stops []Stop + func ParseGradient(s string) (*Gradient, error) + func (g *Gradient) ColorAt(x, y, cols, rows int) color.NRGBA + func (g *Gradient) Darkest(bg color.NRGBA) (Stop, float64) + func (g *Gradient) Lightest(bg color.NRGBA) (Stop, float64) + func (g *Gradient) SVGDef(id string) string + type GradientKind string + const GradientLinear + const GradientRadial + type Issue struct + Code string + Hint string + Message string + Severity Severity + type Logo struct + Excavate bool + Image image.Image + Padding int + Scale float64 + type ModulePainter interface + Name func() string + Raster func(dst *image.NRGBA, r image.Rectangle, n Neighbors, c color.NRGBA) + SVGPath func(x, y int, n Neighbors) string + func ModuleShape(name string) (ModulePainter, error) + type Neighbors struct + Down bool + Left bool + Right bool + Up bool + type Renderer interface + Name func() string + Render func(m encoder.Matrix, s Style) (Canvas, error) + func Get(name string) (Renderer, error) + type Report struct + ContrastRatio float64 + Grade Grade + Inverted bool + Issues []Issue + QuietZone int + Score int + func Scannability(c Canvas) Report + func (r Report) OK() bool + type Severity string + const SeverityError + const SeverityInfo + const SeverityWarn + type Stop struct + Color color.NRGBA + Offset float64 + type Style struct + BG color.NRGBA + BarHeight int + Caption string + ECC string + Eye string + EyeBall string + EyeFG *color.NRGBA + FG color.NRGBA + Frame *Frame + Gradient *Gradient + HRI bool + Logo *Logo + Module string + QuietZone int + func DefaultStyle() Style