update qr code system and add location setter for suppliers
This commit is contained in:
@@ -22,13 +22,13 @@ module RQRCode
|
||||
close_tag = "</svg>"
|
||||
|
||||
result = []
|
||||
qrcode.modules.each_index do |c|
|
||||
for c in 0...qrcode.module_count
|
||||
tmp = []
|
||||
qrcode.modules.each_index do |r|
|
||||
for r in 0...qrcode.module_count
|
||||
y = c*unit + offset
|
||||
x = r*unit + offset
|
||||
|
||||
next unless qrcode.is_dark(c, r)
|
||||
next unless qrcode.dark?(c, r)
|
||||
tmp << %{<rect width="#{unit}" height="#{unit}" x="#{x}" y="#{y}" style="fill:##{color}"/>}
|
||||
end
|
||||
result << tmp.join("\n")
|
||||
|
||||
Reference in New Issue
Block a user