Documentation ¶
Index ¶
- Constants
- func OpenImage(logoPath string) (image.Image, error)
- func SaveToPNGFile(img image.Image, outFile string) error
- type LogoPaddingType
- type Options
- func BackgroundColor(backgroundColor color.Color) Options
- func CodeColour(codeColor color.Color) Options
- func DisableBorder(disableBorder bool) Options
- func LogoCoverage(logoCoverage float64) Options
- func PaddingType(logoPaddingType LogoPaddingType) Options
- func PaddingWeight(paddingWeight int) Options
- func QRSize(qrSize int) Options
- type QRLogo
Constants ¶
View Source
const ( // LogoPaddingCircle adds a circle border around the logo LogoPaddingCircle = "circle" // LogoPaddingDilate adds a dilated (traced) border around the logo LogoPaddingDilate = "dilate" // LogoPaddingNone adds no padding LogoPaddingNone = "none" // LogoPaddingSquare adds a square border around the logo LogoPaddingSquare = "square" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogoPaddingType ¶
type LogoPaddingType string
type Options ¶
type Options func(*QRLogo)
func BackgroundColor ¶
BackgroundColor sets the background color of the code
func CodeColour ¶
CodeColour sets the colour of the QRCode bars
func DisableBorder ¶
DisableBorder sets whether there is a border around the whole QRCode
func LogoCoverage ¶
LogoCoverage sets the percentage of the QRCode to be covered in range [0,1] with 1 being 100% The error correction ability of a QRCode is at max 30%, so this value should *not* be exceeded, but other factors may force this value down
func PaddingType ¶
func PaddingType(logoPaddingType LogoPaddingType) Options
PaddingType sets the type of padding to use when rendering the logo
func PaddingWeight ¶
PaddingWeight sets the amount of padding around the logo
Click to show internal directories.
Click to hide internal directories.