Sha256: 9e0f0760c5f1b712285c2bdb5af235137567ea3f09a25bdf941c526926f2a8eb

Contents?: true

Size: 607 Bytes

Versions: 43

Compression:

Stored size: 607 Bytes

Contents

proc_name = "slide-background-image"

if @slide_background_image.nil?
  theme_exit("must specify @slide_background_image!!")
end

match(Slide) do |slides|
  loader = ImageLoader.new(find_file(@slide_background_image))
  resized = false

  slides.delete_pre_draw_proc_by_name(proc_name)

  slides.add_pre_draw_proc(proc_name) do |slide, canvas, x, y, w, h, simulation|
    unless simulation
      unless loader.nil?
        unless resized
          loader.resize(canvas.width, canvas.height)
          resized = true
        end
        loader.draw(canvas, 0, 0)
      end
    end
    [x, y, w, h]
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
rabbit-3.0.3 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-3.0.2 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-3.0.1 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-3.0.0 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.2.1 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.2.0 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.9 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.8 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.7 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.6 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.5 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.4 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.3 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.2 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.1 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.1.0 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.0.9 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.0.8 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.0.7 lib/rabbit/theme/slide-background-image/slide-background-image.rb
rabbit-2.0.6 lib/rabbit/theme/slide-background-image/slide-background-image.rb