prawn-qrcode 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/prawn/qrcode.rb CHANGED
@@ -89,13 +89,22 @@ module QRCode
89
89
 
90
90
  qr_code.modules.each_index do |row|
91
91
  pos_x = 4*dot
92
+ dark_col = 0
92
93
  qr_code.modules.each_index do |col|
93
94
  move_to [pos_x, pos_y]
94
95
  if qr_code.dark?(row, col)
95
- fill { rectangle([pos_x, pos_y], dot, dot) }
96
+ dark_col = dark_col+1
97
+ else
98
+ if (dark_col>0)
99
+ fill { rectangle([pos_x - dark_col*dot, pos_y], dot*dark_col, dot) }
100
+ dark_col = 0
101
+ end
96
102
  end
97
103
  pos_x = pos_x + dot
98
104
  end
105
+ if (dark_col > 0)
106
+ fill { rectangle([pos_x - dark_col*dot, pos_y], dot*dark_col, dot) }
107
+ end
99
108
  pos_y = pos_y - dot
100
109
  end
101
110
  end
data/prawn-qrcode.gemspec CHANGED
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- PRAWN_QRCODE_VERSION = "0.1.1"
15
+ PRAWN_QRCODE_VERSION = "0.1.2"
16
16
 
17
17
  Gem::Specification.new do |spec|
18
18
  spec.name = "prawn-qrcode"
@@ -38,4 +38,4 @@ Gem::Specification.new do |spec|
38
38
  Prawn/QRCode simplifies the generation and rendering of QRCodes in Prawn PDF documents.
39
39
  QR Codes
40
40
  END_DESC
41
- end
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-qrcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-08 00:00:00.000000000Z
12
+ date: 2011-09-09 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: prawn
16
- requirement: &70156970180620 !ruby/object:Gem::Requirement
16
+ requirement: &70253615183240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: '0.13'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70156970180620
27
+ version_requirements: *70253615183240
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rqrcode
30
- requirement: &70156970210100 !ruby/object:Gem::Requirement
30
+ requirement: &70253615182520 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,7 +35,7 @@ dependencies:
35
35
  version: 0.4.1
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70156970210100
38
+ version_requirements: *70253615182520
39
39
  description: ! " Prawn/QRCode simplifies the generation and rendering of QRCodes
40
40
  in Prawn PDF documents.\n QR Codes\n"
41
41
  email:
@@ -48,10 +48,12 @@ extra_rdoc_files:
48
48
  files:
49
49
  - examples/autosize_qrcode.rb
50
50
  - examples/autosized code.pdf
51
+ - examples/autosized.pdf
51
52
  - examples/dotsize.pdf
52
53
  - examples/dotsize_qrcode.rb
53
54
  - examples/examples.iml
54
55
  - examples/prepared code.pdf
56
+ - examples/prepared.pdf
55
57
  - examples/prepared_qrcode.rb
56
58
  - lib/lib.iml
57
59
  - lib/prawn/qrcode.rb