Method: Axlsx::OneCellAnchor#initialize

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

#initialize(drawing, options = {}) ⇒ OneCellAnchor

Creates a new OneCellAnchor object and an Pic associated with it.

Options Hash (options):

  • start_at (Array)

    the col, row to start at

  • width (Integer)
  • height (Integer)
  • image_src (String)

    the file location of the image you will render

  • name (String)

    the name attribute for the rendered image

  • descr (String)

    the description of the image rendered



19
20
21
22
23
24
25
26
27
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 19

def initialize(drawing, options={})
  @drawing = drawing
  @width = 0
  @height = 0
  drawing.anchors << self
  @from = Marker.new
  parse_options options
  @object = Pic.new(self, options)
end