prawn-fillform 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Prawn
3
3
  module Fillform
4
- VERSION = "0.0.14"
4
+ VERSION = "0.0.15"
5
5
  end
6
6
  end
7
7
 
@@ -220,10 +220,11 @@ module Prawn
220
220
 
221
221
  if value
222
222
  value = value.to_s
223
+ x_offset = options[:x_offset] || self.class.fillform_x_offset
224
+ y_offset = options[:y_offset] || self.class.fillform_y_offset
225
+
223
226
  if field.type == :text
224
227
  fill_color options[:font_color] || field.font_color
225
- x_offset = options[:x_offset] || self.class.fillform_x_offset
226
- y_offset = options[:y_offset] || self.class.fillform_y_offset
227
228
 
228
229
  text_box value, :at => [field.x + x_offset, field.y + y_offset],
229
230
  :align => options[:align] || field.align,
@@ -234,7 +235,7 @@ module Prawn
234
235
  :style => options[:font_style] || field.font_style
235
236
  elsif field.type == :button
236
237
 
237
- bounding_box([field.x, field.y], :width => field.width, :height => field.height) do
238
+ bounding_box([field.x + x_offset, field.y + y_offset], :width => field.width, :height => field.height) do
238
239
  if value =~ /http/
239
240
  image open(value), :position => options[:position] || :center,
240
241
  :vposition => options[:vposition] || :center,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-fillform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
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-07 00:00:00.000000000 Z
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: prawn
@@ -64,9 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project: prawn-fillform
67
- rubygems_version: 1.8.23
67
+ rubygems_version: 1.8.24
68
68
  signing_key:
69
69
  specification_version: 3
70
70
  summary: fill text and images through acroform fields
71
71
  test_files: []
72
- has_rdoc: