lib/axlsx/drawing/one_cell_anchor.rb in axlsx-1.0.8 vs lib/axlsx/drawing/one_cell_anchor.rb in axlsx-1.0.9

- old
+ new

@@ -15,24 +15,19 @@ # The drawing that holds this anchor # @return [Drawing] attr_reader :drawing - # The index of this anchor in the drawing - # @return [Integer] - attr_reader :index - - # the width of the graphic object in pixels. # this is converted to EMU at a 92 ppi resolution # @return [Integer] - attr_accessor :width + attr_reader :width # the height of the graphic object in pixels # this is converted to EMU at a 92 ppi resolution # @return [Integer] - attr_accessor :height + attr_reader :height # Creates a new OneCellAnchor object and an Pic associated with it. # @param [Drawing] drawing # @option options [Array] start_at the col, row to start at @@ -51,12 +46,17 @@ self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" end @object = Pic.new(self, options) end + # @see height def height=(v) Axlsx::validate_unsigned_int(v); @height = v; end + + # @see width def width=(v) Axlsx::validate_unsigned_int(v); @width = v; end + # The index of this anchor in the drawing + # @return [Integer] def index @drawing.anchors.index(self) end # Serializes the anchor