Documentation ¶
Overview ¶
Package rmqr handles rMRQ Codes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EncodeOptions ¶
type EncodeOptions func(opts *encodeOptions)
func WithKanji ¶
func WithKanji(use bool) EncodeOptions
WithKanji enables the kanji mode. The default mode is true. If it's enabled, Shift-JIS encoding is used for kanji mode.
func WithLevel ¶
func WithLevel(lv Level) EncodeOptions
WithLevel sets the error correction level. The default value is LevelM.
func WithModuleSize ¶
func WithModuleSize(size float64) EncodeOptions
WithModuleSize sets the module size. The default value is 1.
func WithPriority ¶
func WithPriority(priority Priority) EncodeOptions
WithPriority sets the priority for selecting the version.
func WithQuietZone ¶ added in v0.2.0
func WithQuietZone(n int) EncodeOptions
WithQuietZone sets the quiet zone size. The default value is 2.
func WithWidth ¶ added in v0.2.0
func WithWidth(width int) EncodeOptions
WithWidth sets the width of the image. The larger of the image width calculated from WithModuleSize and the image width specified with WithWidth is used. The image height is calculated from the image width.
type Level ¶
type Level int
type Mode ¶
type Mode uint8
const ( // ModeNumeric is number mode. // The Data must be ascii characters [0-9]. ModeNumeric Mode = 0b001 // ModeAlphanumeric is alphabet and number mode. // The Data must be ascii characters [0-9A-Z $%*+\-./:]. ModeAlphanumeric Mode = 0b010 // ModeBytes is 8-bit bytes mode. // The Data can include any bytes. ModeBytes Mode = 0b011 // ModeKanji is Japanese Kanji mode. ModeKanji Mode = 0b100 ModeTerminated Mode = 0b0000 )
type Version ¶
type Version int
const ( R7x43 Version = 0b00000 R7x59 Version = 0b00001 R7x77 Version = 0b00010 R7x99 Version = 0b00011 R7x139 Version = 0b00100 R9x43 Version = 0b00101 R9x59 Version = 0b00110 R9x77 Version = 0b00111 R9x99 Version = 0b01000 R9x139 Version = 0b01001 R11x27 Version = 0b01010 R11x43 Version = 0b01011 R11x59 Version = 0b01100 R11x77 Version = 0b01101 R11x99 Version = 0b01110 R11x139 Version = 0b01111 R13x27 Version = 0b10000 R13x43 Version = 0b10001 R13x59 Version = 0b10010 R13x77 Version = 0b10011 R13x99 Version = 0b10100 R13x139 Version = 0b10101 R15x43 Version = 0b10110 R15x59 Version = 0b10111 R15x77 Version = 0b11000 R15x99 Version = 0b11001 R15x139 Version = 0b11010 R17x43 Version = 0b11011 R17x59 Version = 0b11100 R17x77 Version = 0b11101 R17x99 Version = 0b11110 R17x139 Version = 0b11111 )
Click to show internal directories.
Click to hide internal directories.