Method: Axlsx::Drawing#add_image

Defined in:
lib/axlsx/drawing/drawing.rb

#add_image(options = {}) ⇒ Pic

Note:

The recommended way to manage images is to use Worksheet.add_image. Please refer to that method for documentation.

Adds an image to the chart If th end_at option is specified we create a two cell anchor. By default we use a one cell anchor.

Returns:

See Also:



85
86
87
88
89
90
91
92
# File 'lib/axlsx/drawing/drawing.rb', line 85

def add_image(options={})
  if options[:end_at]
    TwoCellAnchor.new(self, options).add_pic(options)
  else
    OneCellAnchor.new(self, options)
  end
  @anchors.last.object
end