Versions in this module Expand all Collapse all v1 v1.5.8 Aug 5, 2021 Changes in this version + const EncModeAlphanumeric + const EncModeAuto + const EncModeByte + const EncModeJP + const EncModeNone + const EncModeNumeric + const ErrorCorrectionHighest + const ErrorCorrectionLow + const ErrorCorrectionMedium + const ErrorCorrectionQuart + const JPEG_FORMAT + const PNG_FORMAT + func SetDebugMode() + type Config = outputEncodingOption + func DefaultConfig() *Config + type DrawContext struct + func (dc *DrawContext) Color() color.Color + func (dc *DrawContext) Edge() (width, height int) + func (dc *DrawContext) UpperLeft() image.Point + type IShape interface + Draw func(ctx *DrawContext) + DrawFinder func(ctx *DrawContext) + type ImageEncoder interface + Encode func(w io.Writer, img image.Image) error + type ImageOption interface + func WithBgColor(c color.Color) ImageOption + func WithBgColorRGBHex(hex string) ImageOption + func WithBuiltinImageEncoder(format formatTyp) ImageOption + func WithCircleShape() ImageOption + func WithCustomImageEncoder(encoder ImageEncoder) ImageOption + func WithCustomShape(shape IShape) ImageOption + func WithFgColor(c color.Color) ImageOption + func WithFgColorRGBHex(hex string) ImageOption + func WithLogoImage(img image.Image, fit bool) ImageOption + func WithLogoImageFileJPEG(f string, fit bool) ImageOption + func WithLogoImageFilePNG(f string, fit bool) ImageOption + func WithQRWidth(width uint8) ImageOption + type QRCode struct + func New(text string, opts ...ImageOption) (*QRCode, error) + func NewWithConfig(text string, encOpts *Config, opts ...ImageOption) (*QRCode, error) + func NewWithSpecV(text string, ver int, ecLv ecLevel, opts ...ImageOption) (*QRCode, error) + func (q *QRCode) Save(saveToPath string) (err error) + func (q *QRCode) SaveTo(w io.Writer) error