qrcodehelper

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	P image.Point
	R int
}

func (*Circle) At

func (c *Circle) At(x, y int) color.Color

func (*Circle) Bounds

func (c *Circle) Bounds() image.Rectangle

func (*Circle) ColorModel

func (c *Circle) ColorModel() color.Model

type QRCodeGen

type QRCodeGen struct {
	Content string               // 二维码内容,必填
	Level   qrcode.RecoveryLevel // 容错级别(越高越好),Low,Medium,High,Highest,必填
	Size    int                  // 像素单位,必填
	Output  string               // 输出路径,GetQRCodeFile、GetQRCodeCustom、CreateQrCodeWithLogo、CreateQrCodeCustomWithLogo必填
	BColor  color.Color          // 前景颜色
	GColor  color.Color          // 背景颜色
}
func (q *QRCodeGen) CreateQrCodeWithCircleLogo() (err error)

CreateQrCodeCustomWithLogo 带logo的二维码图片生成自定义颜色

func (q *QRCodeGen) CreateQrCodeWithLogo() (err error)

CreateQrCodeWithLogo 带logo的二维码图片生成

func (*QRCodeGen) GetQRCodeCustomColor added in v0.1.38

func (q *QRCodeGen) GetQRCodeCustomColor() (err error)

GetQRCodeCustom 生成二维码自定义颜色 bColor-前景颜色 gColor-背景颜色

func (*QRCodeGen) GetQRCodeFile

func (q *QRCodeGen) GetQRCodeFile() (err error)

GetQRCodeFile 生成二维码图片

func (*QRCodeGen) GetQRCodeIO

func (q *QRCodeGen) GetQRCodeIO() (raw string, err error)

GetQRCodeIO 返回图片字节

type Rectangle

type Rectangle struct {
	P image.Point
	W int
	H int
}

func (*Rectangle) At

func (r *Rectangle) At(x, y int) color.Color

func (*Rectangle) Bounds

func (r *Rectangle) Bounds() image.Rectangle

func (*Rectangle) ColorModel

func (r *Rectangle) ColorModel() color.Model

Jump to

Keyboard shortcuts

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