update qr code system and add location setter for suppliers

This commit is contained in:
2012-11-19 19:09:23 +01:00
parent 0036e5da60
commit 633665daaa
13 changed files with 369 additions and 350 deletions
+3 -3
View File
@@ -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")