Documentation
¶
Index ¶
- Constants
- Variables
- func ApiVersion() (major, minor, micro int)
- func ApiVersionString() string
- func InputCheck(mode C.QRencodeMode, r interface{}) error
- func ThrowAndCatchException() error
- type Image
- func (c *Image) Draw(bitmap [][]bool) *Image
- func (c *Image) DrawQRcode(qrcode *QRcode) *Image
- func (c *Image) Encode(outputType string, w io.Writer) error
- func (c *Image) GetBackgroundColor() color.Color
- func (c *Image) GetForegroundColor() color.Color
- func (c *Image) GetSize() int
- func (c *Image) JPEG(w io.Writer, options *jpeg.Options) error
- func (c *Image) New()
- func (c *Image) PNG(w io.Writer) error
- func (c *Image) SetBackgroundColor(back color.Color) *Image
- func (c *Image) SetForegroundColor(fore color.Color) *Image
- func (c *Image) SetSize(size int) *Image
- func (c *Image) WriteFile(filename string) error
- type Input
- func (c *Input) Append(mode C.QRencodeMode, r interface{}) error
- func (c *Input) AppendECIHeader(ecinum uint) error
- func (c *Input) Destroy()
- func (c *Input) GetErrorCorrectionLevel() C.QRecLevel
- func (c *Input) GetVersion() int
- func (c *Input) New() error
- func (c *Input) SetErrorCorrectionLevel(level C.QRecLevel) error
- func (c *Input) SetVersion(version int) error
- func (c *Input) SetVersionAndErrorCorrectionLevel(version int, level C.QRecLevel) error
- type QRcode
Constants ¶
const ( QR_MODE_NUL = C.QR_MODE_NUL ///< Terminator (NUL character). Internal use only QR_MODE_NUM = C.QR_MODE_NUM ///< Numeric mode QR_MODE_AN = C.QR_MODE_AN ///< Alphabet-numeric mode QR_MODE_8 = C.QR_MODE_8 ///< 8-bit data mode QR_MODE_KANJI = C.QR_MODE_KANJI ///< Kanji (shift-jis) mode QR_MODE_STRUCTURE = C.QR_MODE_STRUCTURE ///< Internal use only QR_MODE_ECI = C.QR_MODE_ECI ///< ECI mode QR_MODE_FNC1FIRST = C.QR_MODE_FNC1FIRST ///< FNC1 first position QR_MODE_FNC1SECOND = C.QR_MODE_FNC1SECOND ///< FNC1 second position )
QRencodeMode
const ( QR_ECLEVEL_L = C.QR_ECLEVEL_L ///< lowest QR_ECLEVEL_M = C.QR_ECLEVEL_M QR_ECLEVEL_Q = C.QR_ECLEVEL_Q QR_ECLEVEL_H = C.QR_ECLEVEL_H ///< highest )
QRecLevel
const ( IMAGE_OUTPUT_JPEG string = "jpeg" IMAGE_OUTPUT_JPG string = "jpg" IMAGE_OUTPUT_PNG string = "png" )
Variables ¶
Functions ¶
func ApiVersion ¶
func ApiVersion() (major, minor, micro int)
* Return a string that identifies the library version.
func ApiVersionString ¶
func ApiVersionString() string
* Return a string that identifies the library version.
func InputCheck ¶
func InputCheck(mode C.QRencodeMode, r interface{}) error
* Validate the input data. * See qrencode.h QRinput_check
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
* goqrencode image
func (*Image) GetBackgroundColor ¶
* get image background color
func (*Image) GetForegroundColor ¶
* get image foreground color
func (*Image) SetBackgroundColor ¶
* set image background color * default black
func (*Image) SetForegroundColor ¶
* set image foreground color * default white
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
* goqrencode Input
func (*Input) Append ¶
func (c *Input) Append(mode C.QRencodeMode, r interface{}) error
* Append data to an input object * The data is copied and appended to the input object. * See qrencode.h QRinput_append *
func (*Input) AppendECIHeader ¶
* Append ECI header. * See qrcnecode.h QRinput_appendECIheader
func (*Input) Destroy ¶
func (c *Input) Destroy()
* free input object * See qrcnecode.h QRinput_free
func (*Input) GetErrorCorrectionLevel ¶
* Get current error correction level. * See qrcnecode.h QRinput_getErrorCorrectionLevel
func (*Input) GetVersion ¶
* Get current version. * See qrcnecode.h QRinput_getVersion
func (*Input) SetErrorCorrectionLevel ¶
* Set error correction level of the QR code that is to be encoded. * See qrcnecode.h QRinput_setErrorCorrectionLevel
func (*Input) SetVersion ¶
* Set version of the QR code that is to be encoded. * See qrcnecode.h QRinput_setVersion
type QRcode ¶
type QRcode struct {
// contains filtered or unexported fields
}
* goqrencode QRcode
func EncodeInput ¶
* Create a symbol from the input data. * see libqrencode QRcode_encodeInput