Sha256: f2ef3a5c5d4b8290d1a6d53950105ece72033191402f34d553c4594ac691df9a

Contents?: true

Size: 492 Bytes

Versions: 41

Compression:

Stored size: 492 Bytes

Contents

proc_name = "per-slide-background-color"

match(Slide) do |slides|
  slides.each do |slide|
    slide.delete_pre_draw_proc_by_name(proc_name)

    background_color = slide["background-color"]
    next if background_color.nil?

    slide.add_pre_draw_proc(proc_name) do |canvas, x, y, w, h, simulation|
      unless simulation
        canvas.draw_rectangle(true, 0, 0, canvas.width, canvas.height,
                              background_color)
      end
      [x, y, w, h]
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rabbit-2.0.5 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.4 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.3 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.2 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.1 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.0 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.9 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.8 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.7 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.6 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.5 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.4 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.3 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.2 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.1 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-1.0.0 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-0.9.3 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-0.9.2 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-0.9.1 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-0.9.0 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb