qrcode

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateQrcode

func GenerateQrcode(content string, writeCloser io.WriteCloser, opts ...standard.ImageOption) error

func GenerateStripeQRCode

func GenerateStripeQRCode(content, filePath string) error

GenerateStripeQRCode 便捷函数:用默认样式直接生成条纹二维码文件

func IsWhite

func IsWhite(c color.Color) bool

func WithCircleShape

func WithCircleShape() standard.ImageOption

func WithCustomStripeShape

func WithCustomStripeShape(dark color.RGBA) standard.ImageOption

func WithRoundedSquareShape

func WithRoundedSquareShape() standard.ImageOption

func WithStripeShape

func WithStripeShape() standard.ImageOption

Types

type BufferWriteCloser

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

func CreateBufferWriteCloser

func CreateBufferWriteCloser() *BufferWriteCloser

func (*BufferWriteCloser) Bytes

func (w *BufferWriteCloser) Bytes() []byte

func (*BufferWriteCloser) Close

func (w *BufferWriteCloser) Close() error

func (*BufferWriteCloser) Write

func (w *BufferWriteCloser) Write(p []byte) (n int, err error)

type ShapeCircle

type ShapeCircle struct {
	Color color.Color
	// contains filtered or unexported fields
}

func (*ShapeCircle) Draw

func (s *ShapeCircle) Draw(ctx *standard.DrawContext)

func (*ShapeCircle) DrawFinder

func (s *ShapeCircle) DrawFinder(ctx *standard.DrawContext)

type ShapeRoundedSquare

type ShapeRoundedSquare struct {
	Color color.Color
	// contains filtered or unexported fields
}

func (*ShapeRoundedSquare) Draw

func (s *ShapeRoundedSquare) Draw(ctx *standard.DrawContext)

func (*ShapeRoundedSquare) DrawFinder

func (s *ShapeRoundedSquare) DrawFinder(ctx *standard.DrawContext)

type StripeQRCode

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

StripeQRCode 条纹胶囊风格二维码

func NewStripeQRCode

func NewStripeQRCode() *StripeQRCode

func (*StripeQRCode) Draw

func (s *StripeQRCode) Draw(ctx *standard.DrawContext)

Draw 实现 IShape 接口 —— 有预扫描 dirs 时查表,否则走逐格逻辑。

func (*StripeQRCode) DrawFinder

func (s *StripeQRCode) DrawFinder(ctx *standard.DrawContext)

func (*StripeQRCode) GenerateFile

func (s *StripeQRCode) GenerateFile(content, filePath string) error

func (*StripeQRCode) SetDotRadius

func (s *StripeQRCode) SetDotRadius(r float64) *StripeQRCode

func (*StripeQRCode) WithColors

func (s *StripeQRCode) WithColors(bg, dark, _ color.RGBA) *StripeQRCode

func (*StripeQRCode) WithModuleSize

func (s *StripeQRCode) WithModuleSize(size int) *StripeQRCode

Jump to

Keyboard shortcuts

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