class Rabbit::Renderer::Offscreen
Attributes
Public Class Methods
Source
# File lib/rabbit/renderer/offscreen.rb, line 30 def initialize(canvas) super(canvas) @filename = nil @pango_context = nil end
Calls superclass method
Rabbit::Renderer::Base::new
Public Instance Methods
Source
# File lib/rabbit/renderer/offscreen.rb, line 94 def create_pango_context context = Gtk::Label.new.create_pango_context set_font_resolution(context) context end
Source
# File lib/rabbit/renderer/offscreen.rb, line 71 def make_layout(text) attrs, text = Pango.parse_markup(text) layout = Pango::Layout.new(create_pango_context) layout.text = text layout.set_attributes(attrs) layout end
Source
# File lib/rabbit/renderer/offscreen.rb, line 44 def post_apply_theme end
Source
# File lib/rabbit/renderer/offscreen.rb, line 47 def post_move(old_index, index) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 50 def post_move_in_slide(old_index, index) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 108 def post_to_pixbuf(canceled) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 68 def post_toggle_index_mode end
Source
# File lib/rabbit/renderer/offscreen.rb, line 100 def pre_to_pixbuf(n_slides) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 65 def pre_toggle_index_mode end
Source
# File lib/rabbit/renderer/offscreen.rb, line 79 def to_pixbuf(slide) pixbuf = nil ::Cairo::ImageSurface.new(@base_width, @base_height) do |surface| context = ::Cairo::Context.new(surface) init_context(context) slide.draw(@canvas) png = StringIO.new surface.write_to_png(png) loader = ImageDataLoader.new(png.string) pixbuf = loader.load finish_context end pixbuf end
Source
# File lib/rabbit/renderer/offscreen.rb, line 103 def to_pixbufing(i) Utils.process_pending_events true end
Private Instance Methods
Source
# File lib/rabbit/renderer/offscreen.rb, line 112 def offscreen_renderer? true end