qrposter

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXT_JPG = ".jpg"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	BgPath  string
	DstPath string
	DstFile *os.File
}

type Poster

type Poster struct {
	*Content
	*Rect
	Qr *Qr
}

func NewPoster

func NewPoster(content Content, rect *Rect, qr Qr) *Poster

func (*Poster) Generate

func (p *Poster) Generate() (err error)

type Qr

type Qr struct {
	Path string
	X    int
	Y    int
}

type QrCode

type QrCode struct {
	URL      string
	Width    int
	Height   int
	Ext      string
	Level    qr.ErrorCorrectionLevel
	Mode     qr.Encoding
	FileName string
}

func NewQrCode

func NewQrCode(url string, width, height int, level qr.ErrorCorrectionLevel, mode qr.Encoding) *QrCode

func (*QrCode) Encode

func (q *QrCode) Encode(folderPath string) (filePath string, err error)

Encode generate QR code

func (*QrCode) GetQrCodeExt

func (q *QrCode) GetQrCodeExt() string

type Rect

type Rect struct {
	X0 int
	Y0 int
	X1 int
	Y1 int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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