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 +1 -1
- data/fn_document.gemspec +1 -1
- data/lib/fn/pdf/writer.rb +12 -6
- data/lib/fn/swf/node/photo_block.rb +12 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
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
|
+
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
|
152
|
-
|
153
|
-
|
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
|
158
|
-
|
159
|
-
|
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
|
38
|
-
|
39
|
-
|
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
|
44
|
-
|
45
|
-
|
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:
|
4
|
+
hash: 41
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 9
|
10
|
+
version: 0.9.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nathan Colgate Clark
|