fn_document 0.9.8 → 0.9.9

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.8
1
+ 0.9.9
data/fn_document.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fn_document"
8
- s.version = "0.9.8"
8
+ s.version = "0.9.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Colgate Clark", "Kyle Maxwell"]
data/lib/fn/pdf/writer.rb CHANGED
@@ -148,15 +148,21 @@ module FN
148
148
  iw, ih = dims
149
149
  ah = aw * ih / iw
150
150
  case block["align"]
151
- when /right/: x = bx + bw - aw
152
- when /center/: x = bx + (bw - aw) / 2
153
- else x = bx
151
+ when /right/
152
+ x = bx + bw - aw
153
+ when /center/
154
+ x = bx + (bw - aw) / 2
155
+ else
156
+ x = bx
154
157
  end
155
158
 
156
159
  case block["align"]
157
- when /bottom/: y = by + bh
158
- when /middle/: y = by + bh / 2
159
- else y = by
160
+ when /bottom/
161
+ y = by + bh
162
+ when /middle/
163
+ y = by + bh / 2
164
+ else
165
+ y = by
160
166
  end
161
167
 
162
168
  return [x, y, aw, ah]
@@ -34,15 +34,21 @@ module FN
34
34
  h = ow * scale
35
35
 
36
36
  x = case align
37
- when /center/: bx + (bw - w) / 2.0;
38
- when /right/: bx + (bw - w)
39
- else; bx
37
+ when /center/
38
+ bx + (bw - w) / 2.0;
39
+ when /right/
40
+ bx + (bw - w)
41
+ else
42
+ bx
40
43
  end
41
44
 
42
45
  y = case align
43
- when /middle/: by + (bh - h) / 2.0;
44
- when /bottom/: by + (bh - h)
45
- else; by
46
+ when /middle/
47
+ by + (bh - h) / 2.0;
48
+ when /bottom/
49
+ by + (bh - h)
50
+ else
51
+ by
46
52
  end
47
53
 
48
54
  struct << ".put #{src} x=#{x} y=#{y} scalex=#{percent} scaley=#{percent}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fn_document
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 41
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 8
10
- version: 0.9.8
9
+ - 9
10
+ version: 0.9.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Colgate Clark