update vendor
This commit is contained in:
parent
824f46979b
commit
8675bc4b7a
328 changed files with 27166 additions and 6537 deletions
18
vendor/github.com/boombuler/barcode/qr/qrcode.go
generated
vendored
18
vendor/github.com/boombuler/barcode/qr/qrcode.go
generated
vendored
|
|
@ -13,6 +13,7 @@ type qrcode struct {
|
|||
dimension int
|
||||
data *utils.BitList
|
||||
content string
|
||||
color barcode.ColorScheme
|
||||
}
|
||||
|
||||
func (qr *qrcode) Content() string {
|
||||
|
|
@ -24,7 +25,11 @@ func (qr *qrcode) Metadata() barcode.Metadata {
|
|||
}
|
||||
|
||||
func (qr *qrcode) ColorModel() color.Model {
|
||||
return color.Gray16Model
|
||||
return qr.color.Model
|
||||
}
|
||||
|
||||
func (c *qrcode) ColorScheme() barcode.ColorScheme {
|
||||
return c.color
|
||||
}
|
||||
|
||||
func (qr *qrcode) Bounds() image.Rectangle {
|
||||
|
|
@ -33,9 +38,9 @@ func (qr *qrcode) Bounds() image.Rectangle {
|
|||
|
||||
func (qr *qrcode) At(x, y int) color.Color {
|
||||
if qr.Get(x, y) {
|
||||
return color.Black
|
||||
return qr.color.Foreground
|
||||
}
|
||||
return color.White
|
||||
return qr.color.Background
|
||||
}
|
||||
|
||||
func (qr *qrcode) Get(x, y int) bool {
|
||||
|
|
@ -158,9 +163,14 @@ func (qr *qrcode) calcPenaltyRule4() uint {
|
|||
return uint(math.Min(floor, ceil) * 10)
|
||||
}
|
||||
|
||||
func newBarcode(dim int) *qrcode {
|
||||
func newBarCodeWithColor(dim int, color barcode.ColorScheme) *qrcode {
|
||||
res := new(qrcode)
|
||||
res.dimension = dim
|
||||
res.data = utils.NewBitList(dim * dim)
|
||||
res.color = color
|
||||
return res
|
||||
}
|
||||
|
||||
func newBarcode(dim int) *qrcode {
|
||||
return newBarCodeWithColor(dim, barcode.ColorScheme16)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue