lib/rabbit/renderer/print/layout.rb in rabbit-2.1.3 vs lib/rabbit/renderer/print/layout.rb in rabbit-2.1.4

- old
+ new

@@ -31,29 +31,29 @@ @margin_right = renderer.margin_right @margin_top = renderer.margin_top @margin_bottom = renderer.margin_bottom end end - + class Layout2 < LayoutBase def initialize(renderer) super @margin_left ||= 50 @margin_right ||= 50 @margin_top ||= 30 @margin_bottom ||= 30 end - + def slide_width page_width - @margin_left - @margin_right end def slide_height (page_height / 2) - @margin_top - @margin_bottom end - + def normalize_x(x) x + @margin_left end def normalize_y(y) @@ -67,28 +67,28 @@ private def below? (current_index % 2) == 1 end end - + class LayoutMore < LayoutBase def initialize(renderer) super @margin_left ||= 10 @margin_right ||= 10 @margin_top ||= 10 @margin_bottom ||= 10 end - + def slide_width (page_width / 2) - @margin_left - @margin_right end def slide_height base = page_height / (slides_per_page / 2.0).ceil base - @margin_top - @margin_bottom end - + def normalize_x(x) base = @margin_left unless left? base += @margin_left + @margin_right + slide_width end