lib/fn/pdf/writer.rb in fn_document-0.9.8 vs lib/fn/pdf/writer.rb in fn_document-0.9.9
- old
+ new
@@ -146,18 +146,24 @@
bh = block["boxHeight"].to_i
aw = block["width"].to_i
iw, ih = dims
ah = aw * ih / iw
case block["align"]
- when /right/: x = bx + bw - aw
- when /center/: x = bx + (bw - aw) / 2
- else x = bx
+ when /right/
+ x = bx + bw - aw
+ when /center/
+ x = bx + (bw - aw) / 2
+ else
+ x = bx
end
case block["align"]
- when /bottom/: y = by + bh
- when /middle/: y = by + bh / 2
- else y = by
+ when /bottom/
+ y = by + bh
+ when /middle/
+ y = by + bh / 2
+ else
+ y = by
end
return [x, y, aw, ah]
end
\ No newline at end of file