barby 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/barby/outputter/rmagick_outputter.rb +17 -8
- data/lib/barby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8050c7d031bdc4c866046b84740632b1f72b74
|
4
|
+
data.tar.gz: daf30f880b830c955b4653684d95996bd0906356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba0fac4a2f56fd7c88689d1b09b69c72a1556e138d0e59a807e4dfe39aef3d1b775770e354fa19e0e2e1cd5e2b9525b6e6a9cfe8fc5c25920a2c0396ad7d7b7
|
7
|
+
data.tar.gz: ce42a339359f0a77ba6127b43be32fc10fc82078a4d99e2883e9a0882c8325f4b5a9b9fe7950841b424b818c8bd23ee895443355d395f6d43bc6448084a273f0
|
data/CHANGELOG
CHANGED
@@ -46,26 +46,35 @@ module Barby
|
|
46
46
|
canvas = Magick::Image.new(full_width, full_height)
|
47
47
|
bars = Magick::Draw.new
|
48
48
|
|
49
|
-
|
50
|
-
|
49
|
+
x1 = margin
|
50
|
+
y1 = margin
|
51
51
|
|
52
52
|
if barcode.two_dimensional?
|
53
53
|
encoding.each do |line|
|
54
54
|
line.split(//).map{|c| c == '1' }.each do |bar|
|
55
55
|
if bar
|
56
|
-
|
56
|
+
x2 = x1+(xdim-1)
|
57
|
+
y2 = y1+(ydim-1)
|
58
|
+
# For single pixels use point
|
59
|
+
if x1 == x2 && y1 == y2
|
60
|
+
bars.point(x1,y1)
|
61
|
+
else
|
62
|
+
bars.rectangle(x1, y1, x2, y2)
|
63
|
+
end
|
57
64
|
end
|
58
|
-
|
65
|
+
x1 += xdim
|
59
66
|
end
|
60
|
-
|
61
|
-
|
67
|
+
x1 = margin
|
68
|
+
y1 += ydim
|
62
69
|
end
|
63
70
|
else
|
64
71
|
booleans.each do |bar|
|
65
72
|
if bar
|
66
|
-
|
73
|
+
x2 = x1+(xdim-1)
|
74
|
+
y2 = y1+(height-1)
|
75
|
+
bars.rectangle(x1, y1, x2, y2)
|
67
76
|
end
|
68
|
-
|
77
|
+
x1 += xdim
|
69
78
|
end
|
70
79
|
end
|
71
80
|
|
data/lib/barby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tore Darell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Barby creates barcodes.
|
14
14
|
email: toredarell@gmail.com
|