Versions in this module Expand all Collapse all v1 v1.2.3 May 31, 2022 v1.2.2 May 31, 2022 Changes in this version + const JPEG_FORMAT + const PNG_FORMAT + var ErrNilWriter = errors.New("nil writer") + type Attribute struct + BlockWidth int + Borders [4]int + H int + W int + type DrawContext struct + func (dc *DrawContext) Color() color.Color + func (dc *DrawContext) Edge() (width, height int) + func (dc *DrawContext) UpperLeft() (dx, dy float64) + 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 WithBgTransparent() ImageOption + func WithBorderWidth(widths ...int) 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 WithHalftone(path string) ImageOption + func WithLogoImage(img image.Image) ImageOption + func WithLogoImageFileJPEG(f string) ImageOption + func WithLogoImageFilePNG(f string) ImageOption + func WithQRWidth(width uint8) ImageOption + type Writer struct + func New(filename string, opts ...ImageOption) (*Writer, error) + func NewWithWriter(writeCloser io.WriteCloser, opts ...ImageOption) *Writer + func (w Writer) Attribute(dimension int) *Attribute + func (w Writer) Close() error + func (w Writer) Write(mat qrcode.Matrix) error