Sha256: 0e79f4fe29c6b12cd8fd1c52d54927ec19033a1534d0327bcd722b24cdf649f5
Contents?: true
Size: 786 Bytes
Versions: 6
Compression:
Stored size: 786 Bytes
Contents
proc_name = "slide-number" @slide_number_props ||= { "size" => @xx_small_font_size, "font_family" => @font_family, } @slide_number_color || nil match(Slide) do |slides| slides.delete_post_draw_proc_by_name(proc_name) break if @slide_number_uninstall slides.add_post_draw_proc(proc_name) do |slide, canvas, x, y, w, h, simulation| unless simulation text = Text.new("#{slide.index}/#{canvas.slide_size - 1}") text.font @slide_number_props text.align = Pango::Layout::ALIGN_RIGHT text.compile(canvas, x, y, w, h) layout = text.layout layout.set_width(w * Pango::SCALE) num_y = canvas.height - @margin_bottom - text.height canvas.draw_layout(text.layout, x, num_y, @slide_number_color) end [x, y, w, h] end end
Version data entries
6 entries across 6 versions & 1 rubygems