summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/one_cell_anchor.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-09-11 11:01:15 +0900
committerRandy Morgan <[email protected]>2013-09-13 00:08:39 +0900
commit923e7b7ff9157bdfe95584b8d311e2f6099ab71d (patch)
tree0af22b454d592a5e4e4287660ac469cbe456fbcb /lib/axlsx/drawing/one_cell_anchor.rb
parent2067c6940fc3a7ef1e8398474ac2c862130504ce (diff)
downloadcaxlsx-923e7b7ff9157bdfe95584b8d311e2f6099ab71d.tar.gz
caxlsx-923e7b7ff9157bdfe95584b8d311e2f6099ab71d.zip
Fixes for anchor swapping when adding images. - Two -> One swap still pending.
Diffstat (limited to 'lib/axlsx/drawing/one_cell_anchor.rb')
-rw-r--r--lib/axlsx/drawing/one_cell_anchor.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/axlsx/drawing/one_cell_anchor.rb b/lib/axlsx/drawing/one_cell_anchor.rb
index b16a939b..faf78278 100644
--- a/lib/axlsx/drawing/one_cell_anchor.rb
+++ b/lib/axlsx/drawing/one_cell_anchor.rb
@@ -48,6 +48,15 @@ module Axlsx
# @return [Integer]
attr_reader :height
+ # sets the starting position for the anchor.
+ # You can provide a String like "A1", an array like [0,0] or a cell object for the x parameter.
+ # We just 'figure it out' for you.
+ # @param [Array, String, Cell, Integer] x Accepts many inputs for defining the starting position of the cell.
+ # @param [Integer] y When x is an integer, this value is used for the row index at which the anchor starts.
+ def start_at(x, y=0)
+ from.coord x, y
+ end
+ #
# @see height
def height=(v) Axlsx::validate_unsigned_int(v); @height = v; end