Documentation
¶
Index ¶
- func GenerateQrcode(content string, writeCloser io.WriteCloser, opts ...standard.ImageOption) error
- func GenerateStripeQRCode(content, filePath string) error
- func IsWhite(c color.Color) bool
- func WithCircleShape() standard.ImageOption
- func WithCustomStripeShape(dark color.RGBA) standard.ImageOption
- func WithRoundedSquareShape() standard.ImageOption
- func WithStripeShape() standard.ImageOption
- type BufferWriteCloser
- type ShapeCircle
- type ShapeRoundedSquare
- type StripeQRCode
- func (s *StripeQRCode) Draw(ctx *standard.DrawContext)
- func (s *StripeQRCode) DrawFinder(ctx *standard.DrawContext)
- func (s *StripeQRCode) GenerateFile(content, filePath string) error
- func (s *StripeQRCode) SetDotRadius(r float64) *StripeQRCode
- func (s *StripeQRCode) WithColors(bg, dark, _ color.RGBA) *StripeQRCode
- func (s *StripeQRCode) WithModuleSize(size int) *StripeQRCode
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 ¶
GenerateStripeQRCode 便捷函数:用默认样式直接生成条纹二维码文件
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
type ShapeCircle ¶
func (*ShapeCircle) Draw ¶
func (s *ShapeCircle) Draw(ctx *standard.DrawContext)
func (*ShapeCircle) DrawFinder ¶
func (s *ShapeCircle) DrawFinder(ctx *standard.DrawContext)
type ShapeRoundedSquare ¶
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
Click to show internal directories.
Click to hide internal directories.