Sha256: 96242586a324bd8b7a525fcadcd05162eb9e937feb4d229f3ccd990d36980ef0

Contents?: true

Size: 943 Bytes

Versions: 43

Compression:

Stored size: 943 Bytes

Contents

proc_name = "footer-logo"

if @footer_logo_image.nil?
  theme_exit("must specify @footer_logo_image!!")
end
@footer_logo_keep_ratio = true if @footer_logo_keep_ratio.nil?
@footer_logo_margin_right ||= @margin_right
@footer_logo_margin_bottom ||= @margin_bottom + screen_y(1)
@footer_logo_uninstall ||= false

match(SlideElement) do
  delete_pre_draw_proc_by_name(proc_name)

  break if @footer_logo_uninstall

  loader = ImageLoader.new(find_file(@footer_logo_image))
  loader.keep_ratio = @footer_logo_keep_ratio
  available_w = canvas.width - @footer_logo_margin_right
  available_h = canvas.height - @footer_logo_margin_bottom
  add_pre_draw_proc(proc_name) do |slide, canvas, x, y, w, h, simulation|
    if simulation
      loader.resize(available_w * 0.1, available_h * 0.1)
    else
      loader.draw(canvas,
                  available_w - loader.width,
                  available_h - loader.height)
    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/footer-logo/footer-logo.rb
rabbit-3.0.2 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-3.0.1 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-3.0.0 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.2.1 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.2.0 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.9 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.8 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.7 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.6 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.5 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.4 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.3 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.2 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.1 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.1.0 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.0.9 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.0.8 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.0.7 lib/rabbit/theme/footer-logo/footer-logo.rb
rabbit-2.0.6 lib/rabbit/theme/footer-logo/footer-logo.rb