barcode

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	NamedPropertiesMap map[string][]string
	Content            string
	Type               render.BarcodeType
	TopLeft            image.Point
	Width              int
	Height             int
	DataColour         color.NRGBA
	BackgroundColour   color.NRGBA
	Extra              render.BarcodeExtraData
}

Component implements the Component interface for images

func (Component) GetJSONFormat

func (component Component) GetJSONFormat() interface{}

GetJSONFormat returns the JSON structure of a barcode component

func (Component) SetNamedProperties

func (component Component) SetNamedProperties(properties render.NamedProperties) (render.Component, error)

SetNamedProperties processes the named properties and sets them into the barcode properties

func (Component) VerifyAndSetJSONData

func (component Component) VerifyAndSetJSONData(data interface{}) (render.Component, render.NamedProperties, error)

VerifyAndSetJSONData processes the data parsed from JSON and uses it to set barcode properties and fill the named properties map

func (Component) Write

func (component Component) Write(canvas render.Canvas) (render.Canvas, error)

Write draws a barcode on the canvas

Jump to

Keyboard shortcuts

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