comment out deprecated QR code. uh. code
This commit is contained in:
parent
42c6540ac3
commit
ef655744bb
1 changed files with 34 additions and 35 deletions
|
@ -2,8 +2,8 @@ package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"image"
|
// "image"
|
||||||
"image/color"
|
// "image/color"
|
||||||
|
|
||||||
"github.com/skip2/go-qrcode"
|
"github.com/skip2/go-qrcode"
|
||||||
)
|
)
|
||||||
|
@ -18,36 +18,35 @@ func GenerateQRCode(data string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// vvv DEPRECATED vvv
|
// vvv DEPRECATED vvv
|
||||||
|
// const margin = 4
|
||||||
const margin = 4
|
//
|
||||||
|
// type QRCodeECCLevel int64
|
||||||
type QRCodeECCLevel int64
|
// const (
|
||||||
const (
|
// LOW QRCodeECCLevel = iota
|
||||||
LOW QRCodeECCLevel = iota
|
// MEDIUM
|
||||||
MEDIUM
|
// QUARTILE
|
||||||
QUARTILE
|
// HIGH
|
||||||
HIGH
|
// )
|
||||||
)
|
//
|
||||||
|
// func drawLargeAlignmentSquare(x int, y int, img *image.Gray) {
|
||||||
func drawLargeAlignmentSquare(x int, y int, img *image.Gray) {
|
// for yi := range 7 {
|
||||||
for yi := range 7 {
|
// for xi := range 7 {
|
||||||
for xi := range 7 {
|
// if (xi == 0 || xi == 6) || (yi == 0 || yi == 6) {
|
||||||
if (xi == 0 || xi == 6) || (yi == 0 || yi == 6) {
|
// img.Set(x + xi, y + yi, color.Black)
|
||||||
img.Set(x + xi, y + yi, color.Black)
|
// } else if (xi > 1 && xi < 5) && (yi > 1 && yi < 5) {
|
||||||
} else if (xi > 1 && xi < 5) && (yi > 1 && yi < 5) {
|
// img.Set(x + xi, y + yi, color.Black)
|
||||||
img.Set(x + xi, y + yi, color.Black)
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//
|
||||||
|
// func drawSmallAlignmentSquare(x int, y int, img *image.Gray) {
|
||||||
func drawSmallAlignmentSquare(x int, y int, img *image.Gray) {
|
// for yi := range 5 {
|
||||||
for yi := range 5 {
|
// for xi := range 5 {
|
||||||
for xi := range 5 {
|
// if (xi == 0 || xi == 4) || (yi == 0 || yi == 4) {
|
||||||
if (xi == 0 || xi == 4) || (yi == 0 || yi == 4) {
|
// img.Set(x + xi, y + yi, color.Black)
|
||||||
img.Set(x + xi, y + yi, color.Black)
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// img.Set(x + 2, y + 2, color.Black)
|
||||||
img.Set(x + 2, y + 2, color.Black)
|
// }
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue