A Cell that contains another table.
# File lib/prawn/table/cell/image.rb, line 15 def initialize(pdf, point, options={}) @image_options = {} super @pdf_object, @image_info = @pdf.build_image_object(@file) @natural_width, @natural_height = @image_info.calc_image_dimensions( @image_options) end
Draw the image on the page.
# File lib/prawn/table/cell/image.rb, line 62 def draw_content @pdf.embed_image(@pdf_object, @image_info, @image_options) end
# File lib/prawn/table/cell/image.rb, line 32 def fit=(f) @image_options[:fit] = f end
# File lib/prawn/table/cell/image.rb, line 24 def image=(file) @file = file end
# File lib/prawn/table/cell/image.rb, line 36 def image_height=(h) @image_options[:height] = h end
# File lib/prawn/table/cell/image.rb, line 40 def image_width=(w) @image_options[:width] = w end
# File lib/prawn/table/cell/image.rb, line 56 def natural_content_height @natural_height end
# File lib/prawn/table/cell/image.rb, line 52 def natural_content_width @natural_width end
# File lib/prawn/table/cell/image.rb, line 44 def position=(p) @image_options[:position] = p end
# File lib/prawn/table/cell/image.rb, line 28 def scale=(s) @image_options[:scale] = s end
# File lib/prawn/table/cell/image.rb, line 48 def vposition=(vp) @image_options[:vposition] = vp end