class OoxmlParser::OldDocxShapeProperties

Fallback DOCX Shape Properties

Attributes

fill_color[RW]
stroke_color[RW]
stroke_weight[RW]

Public Instance Methods

parse(node) click to toggle source

Parse OldDocxShapeProperties object @param node [Nokogiri::XML:Element] node to parse @return [OldDocxShapeProperties] result of parsing

# File lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape_properties.rb, line 11
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'fillcolor'
      @fill_color = Color.new(parent: self).parse_hex_string(value.value.delete('#'))
    when 'strokecolor'
      @stroke_color = Color.new(parent: self).parse_hex_string(value.value.delete('#'))
    when 'strokeweight'
      @stroke_weight = value.value.to_f
    end
  end
  self
end