class Rabbit::Renderer::Print::Layout2

Public Class Methods

new(renderer) click to toggle source
Calls superclass method Rabbit::Renderer::Print::LayoutBase.new
# File lib/rabbit/renderer/print/layout.rb, line 39
def initialize(renderer)
  super
  @margin_left ||= 50
  @margin_right ||= 50
  @margin_top ||= 30
  @margin_bottom ||= 30
end

Public Instance Methods

normalize_x(x) click to toggle source
# File lib/rabbit/renderer/print/layout.rb, line 55
def normalize_x(x)
  x + @margin_left
end
normalize_y(y) click to toggle source
# File lib/rabbit/renderer/print/layout.rb, line 59
def normalize_y(y)
  base = @margin_bottom
  if below?
    base += @margin_top + @margin_bottom + slide_height
  end
  y + base
end
slide_height() click to toggle source
# File lib/rabbit/renderer/print/layout.rb, line 51
def slide_height
  (page_height / 2) - @margin_top - @margin_bottom
end
slide_width() click to toggle source
# File lib/rabbit/renderer/print/layout.rb, line 47
def slide_width
  page_width - @margin_left - @margin_right
end

Private Instance Methods

below?() click to toggle source
# File lib/rabbit/renderer/print/layout.rb, line 68
def below?
  (current_index % 2) == 1
end