class Rabbit::Renderer::Offscreen
Attributes
Public Class Methods
Source
# File lib/rabbit/renderer/offscreen.rb, line 31 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 95 def create_pango_context context = Gtk::Invisible.new.create_pango_context set_font_resolution(context) context end
Source
# File lib/rabbit/renderer/offscreen.rb, line 72 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 45 def post_apply_theme end
Source
# File lib/rabbit/renderer/offscreen.rb, line 48 def post_move(old_index, index) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 51 def post_move_in_slide(old_index, index) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 109 def post_to_pixbuf(canceled) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 69 def post_toggle_index_mode end
Source
# File lib/rabbit/renderer/offscreen.rb, line 101 def pre_to_pixbuf(slide_size) end
Source
# File lib/rabbit/renderer/offscreen.rb, line 66 def pre_toggle_index_mode end
Source
# File lib/rabbit/renderer/offscreen.rb, line 80 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 104 def to_pixbufing(i) Utils.process_pending_events true end
Private Instance Methods
Source
# File lib/rabbit/renderer/offscreen.rb, line 113 def init_color super init_engine_color end
Calls superclass method
Rabbit::Renderer::Base#init_color
Source
# File lib/rabbit/renderer/offscreen.rb, line 118 def offscreen_renderer? true end