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-3.0.3 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-3.0.2 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-3.0.1 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-3.0.0 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.2.1 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.2.0 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.9 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.8 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.7 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.6 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.5 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.4 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.3 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.2 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.1 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.1.0 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.9 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.8 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.7 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb
rabbit-2.0.6 lib/rabbit/theme/per-slide-background-color/per-slide-background-color.rb