barcodes 0.0.9 → 0.0.10

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.
@@ -75,7 +75,6 @@ module Barcodes
75
75
  bar_width_pixels = (barcode.bar_width * 0.001) * 72.0
76
76
  caption_size_pixels = ((barcode.caption_size * 0.001) * 72.0)
77
77
  caption_height_pixels = ((barcode.caption_height * 0.001) * 72.0)
78
- barcode_height_pixels = ((barcode.height * 0.001) * 72.0)
79
78
 
80
79
  pdf.bounding_box([pdf.bounds.left + quiet_zone_width_pixels, pdf.bounds.top], :width => barcode_box_width_pixels, :height => bar_height_pixels) do
81
80
  index = 0
@@ -133,7 +132,6 @@ module Barcodes
133
132
  bar_width_pixels = (barcode.bar_width * 0.001) * 72.0
134
133
  caption_size_pixels = ((barcode.caption_size * 0.001) * 72.0)
135
134
  caption_height_pixels = ((barcode.caption_height * 0.001) * 72.0)
136
- barcode_height_pixels = ((barcode.height * 0.001) * 72.0)
137
135
  encoded_data = barcode.encoded_data
138
136
 
139
137
  if barcode.data.length == 7 # EAN8
@@ -162,7 +160,11 @@ module Barcodes
162
160
  bar_count += 1
163
161
  else
164
162
  if start_range.include?(index) || middle_range.include?(index) || end_range.include?(index)
165
- pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels + (caption_height_pixels * 0.5)
163
+ if barcode.captioned
164
+ pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels + (bar_width_pixels * 5)
165
+ else
166
+ pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels
167
+ end
166
168
  else
167
169
  pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels
168
170
  end
@@ -172,7 +174,11 @@ module Barcodes
172
174
  end
173
175
 
174
176
  if bar_count > 0
175
- pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels + (caption_height_pixels * 0.5)
177
+ if barcode.captioned
178
+ pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels + (bar_width_pixels * 5)
179
+ else
180
+ pdf.fill_rectangle origin, bar_width_pixels * bar_count, bar_height_pixels
181
+ end
176
182
  end
177
183
  end
178
184
 
@@ -7,5 +7,5 @@
7
7
  #
8
8
  module Barcodes
9
9
  # Returns the current version
10
- VERSION = "0.0.9"
10
+ VERSION = "0.0.10"
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barcodes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-13 00:00:00.000000000 Z
12
+ date: 2012-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  segments:
150
150
  - 0
151
- hash: -2445939698446787454
151
+ hash: -4209863144606087038
152
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  version: '0'
158
158
  segments:
159
159
  - 0
160
- hash: -2445939698446787454
160
+ hash: -4209863144606087038
161
161
  requirements: []
162
162
  rubyforge_project: barcodes
163
163
  rubygems_version: 1.8.24