lib/axlsx/drawing/two_cell_anchor.rb in axlsx-1.1.5 vs lib/axlsx/drawing/two_cell_anchor.rb in axlsx-1.1.6
- old
+ new
@@ -32,11 +32,11 @@
# c.start_at 5, 9
# @note the chart_type parameter will be replaced with object in v. 2.0.0
# @param [Drawing] drawing
# @param [Class] chart_type This is passed to the graphic frame for instantiation. must be Chart or a subclass of Chart
# @param object The object this anchor holds.
- # @option options [Array] start_at the col, row to start at
+ # @option options [Array] start_at the col, row to start at THIS IS DOCUMENTED BUT NOT IMPLEMENTED HERE!
# @option options [Array] end_at the col, row to end at
def initialize(drawing, options={})
@drawing = drawing
drawing.anchors << self
@from, @to = Marker.new, Marker.new(:col => 5, :row=>10)
@@ -45,9 +45,14 @@
# Creates a graphic frame and chart object associated with this anchor
# @return [Chart]
def add_chart(chart_type, options)
@object = GraphicFrame.new(self, chart_type, options)
@object.chart
+ end
+
+ # Creates an image associated with this anchor.
+ def add_pic(options={})
+ @object = Pic.new(self, options)
end
# The index of this anchor in the drawing
# @return [Integer]
def index