module MapPrint::PdfHandlers::Texts

Public Instance Methods

print_texts(texts, pdf) click to toggle source
text_options(text) click to toggle source
# File lib/map_print/pdf_handlers/texts.rb, line 10
def text_options(text)
  box = {}

  if text[:position]
    box[:at] = text[:position].values
    box[:at][1] = @pdf.bounds.top - box[:at][1]
  end

  if text[:box_size]
    box[:width] = text[:box_size][:width] if text[:box_size][:width]
    box[:height] = text[:box_size][:height] if text[:box_size][:height]
  end

  text[:options].merge box
end