class Rabbit::Element::PopplerPage
Public Class Methods
new(page)
click to toggle source
Calls superclass method
Rabbit::Element::Base::new
# File lib/rabbit/element/poppler-page.rb, line 10 def initialize(page) @page = page super() end
Public Instance Methods
clear_theme()
click to toggle source
Calls superclass method
Rabbit::Element::BlockHorizontalCentering#clear_theme
# File lib/rabbit/element/poppler-page.rb, line 30 def clear_theme super @width, @height = @page.size end
draw_element(canvas, x, y, w, h, simulation)
click to toggle source
# File lib/rabbit/element/poppler-page.rb, line 15 def draw_element(canvas, x, y, w, h, simulation) unless simulation canvas.draw_poppler_page(@page, x, y, :width => w, :height => h) end [x, y + height, w, h - height] end
text()
click to toggle source
# File lib/rabbit/element/poppler-page.rb, line 26 def text @page.text end
title()
click to toggle source
# File lib/rabbit/element/poppler-page.rb, line 22 def title text.split(/\r?\n/, 2).first end