module MapPrint::PdfHandlers::Images

Public Instance Methods

image_options(image, bounds_top) click to toggle source
# File lib/map_print/pdf_handlers/images.rb, line 16
def image_options(image, bounds_top)
  position = {}

  if image[:position]
    position[:at] = image[:position].values
    position[:at][1] = bounds_top - position[:at][1]
  end

  if image[:options][:fit]
    position[:fit] = [image[:options][:fit][:width], image[:options][:fit][:height]]
  end

  image[:options].merge position
end
print_images(images, pdf) click to toggle source