code

package
v2.0.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 6 Imported by: 8

Documentation

Overview

Package code implements creation of Barcode, MatrixCode and QrCode. nolint:dupl // It's similar to Barcode.go and it's hard to extract common code.

Package code implements creation of Barcode, MatrixCode and QrCode. nolint:dupl

Package code implements creation of Barcode, MatrixCode and QrCode. nolint:dupl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBar

func NewBar(code string, ps ...props.Barcode) core.Component

NewBar is responsible to create an instance of a Barcode.

func NewBarCol

func NewBarCol(size int, code string, ps ...props.Barcode) core.Col

NewBarCol is responsible to create an instance of a Barcode wrapped in a Col.

func NewBarRow

func NewBarRow(height float64, code string, ps ...props.Barcode) core.Row

NewBarRow is responsible to create an instance of a Barcode wrapped in a Row.

func NewMatrix

func NewMatrix(code string, barcodeProps ...props.Rect) core.Component

NewMatrix is responsible to create an instance of a MatrixCode.

func NewMatrixCol

func NewMatrixCol(size int, code string, ps ...props.Rect) core.Col

NewMatrixCol is responsible to create an instance of a MatrixCode wrapped in a Col.

func NewMatrixRow

func NewMatrixRow(height float64, code string, ps ...props.Rect) core.Row

NewMatrixRow is responsible to create an instance of a MatrixCode wrapped in a Row.

func NewQr

func NewQr(code string, barcodeProps ...props.Rect) core.Component

NewQr is responsible to create an instance of a QrCode.

func NewQrCol

func NewQrCol(size int, code string, ps ...props.Rect) core.Col

NewQrCol is responsible to create an instance of a QrCode wrapped in a Col.

func NewQrRow

func NewQrRow(height float64, code string, ps ...props.Rect) core.Row

NewQrRow is responsible to create an instance of a QrCode wrapped in a Row.

Types

type Barcode

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

func (*Barcode) GetStructure

func (b *Barcode) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of a Barcode.

func (*Barcode) Render

func (b *Barcode) Render(provider core.Provider, cell *entity.Cell)

Render renders a Barcode into a PDF context.

func (*Barcode) SetConfig

func (b *Barcode) SetConfig(config *entity.Config)

SetConfig sets the configuration of a Barcode.

type MatrixCode

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

func (*MatrixCode) GetStructure

func (m *MatrixCode) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of a MatrixCode.

func (*MatrixCode) Render

func (m *MatrixCode) Render(provider core.Provider, cell *entity.Cell)

Render renders a MatrixCode into a PDF context.

func (*MatrixCode) SetConfig

func (m *MatrixCode) SetConfig(config *entity.Config)

SetConfig sets the configuration of a MatrixCode.

type QrCode

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

func (*QrCode) GetStructure

func (q *QrCode) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of a QrCode.

func (*QrCode) Render

func (q *QrCode) Render(provider core.Provider, cell *entity.Cell)

Render renders a QrCode into a PDF context.

func (*QrCode) SetConfig

func (q *QrCode) SetConfig(config *entity.Config)

SetConfig set the config for the component.

Jump to

Keyboard shortcuts

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