home to your local SPACEGIRL 💫 arimelody.space
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

comment out deprecated QR code. uh. code

+34 -35
+34 -35
controller/qr.go
··· 2 2 3 3 import ( 4 4 "encoding/base64" 5 - "image" 6 - "image/color" 5 + // "image" 6 + // "image/color" 7 7 8 8 "github.com/skip2/go-qrcode" 9 9 ) ··· 18 18 } 19 19 20 20 // vvv DEPRECATED vvv 21 - 22 - const margin = 4 23 - 24 - type QRCodeECCLevel int64 25 - const ( 26 - LOW QRCodeECCLevel = iota 27 - MEDIUM 28 - QUARTILE 29 - HIGH 30 - ) 31 - 32 - func drawLargeAlignmentSquare(x int, y int, img *image.Gray) { 33 - for yi := range 7 { 34 - for xi := range 7 { 35 - if (xi == 0 || xi == 6) || (yi == 0 || yi == 6) { 36 - img.Set(x + xi, y + yi, color.Black) 37 - } else if (xi > 1 && xi < 5) && (yi > 1 && yi < 5) { 38 - img.Set(x + xi, y + yi, color.Black) 39 - } 40 - } 41 - } 42 - } 43 - 44 - func drawSmallAlignmentSquare(x int, y int, img *image.Gray) { 45 - for yi := range 5 { 46 - for xi := range 5 { 47 - if (xi == 0 || xi == 4) || (yi == 0 || yi == 4) { 48 - img.Set(x + xi, y + yi, color.Black) 49 - } 50 - } 51 - } 52 - img.Set(x + 2, y + 2, color.Black) 53 - } 21 + // const margin = 4 22 + // 23 + // type QRCodeECCLevel int64 24 + // const ( 25 + // LOW QRCodeECCLevel = iota 26 + // MEDIUM 27 + // QUARTILE 28 + // HIGH 29 + // ) 30 + // 31 + // func drawLargeAlignmentSquare(x int, y int, img *image.Gray) { 32 + // for yi := range 7 { 33 + // for xi := range 7 { 34 + // if (xi == 0 || xi == 6) || (yi == 0 || yi == 6) { 35 + // img.Set(x + xi, y + yi, color.Black) 36 + // } else if (xi > 1 && xi < 5) && (yi > 1 && yi < 5) { 37 + // img.Set(x + xi, y + yi, color.Black) 38 + // } 39 + // } 40 + // } 41 + // } 42 + // 43 + // func drawSmallAlignmentSquare(x int, y int, img *image.Gray) { 44 + // for yi := range 5 { 45 + // for xi := range 5 { 46 + // if (xi == 0 || xi == 4) || (yi == 0 || yi == 4) { 47 + // img.Set(x + xi, y + yi, color.Black) 48 + // } 49 + // } 50 + // } 51 + // img.Set(x + 2, y + 2, color.Black) 52 + // }