Class: OoxmlParser::ImageProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/ooxml_parser/common_parser/common_data/colors/image_properties.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#alpha_modulate_fixed_effectObject

Returns the value of attribute alpha_modulate_fixed_effect.



3
4
5
# File 'lib/ooxml_parser/common_parser/common_data/colors/image_properties.rb', line 3

def alpha_modulate_fixed_effect
  @alpha_modulate_fixed_effect
end

Class Method Details

.parse(blip_properties_node) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/ooxml_parser/common_parser/common_data/colors/image_properties.rb', line 5

def self.parse(blip_properties_node)
  properties = ImageProperties.new
  blip_properties_node.xpath('*').each do |property_node|
    case property_node.name
    when 'alphaModFix'
      properties.alpha_modulate_fixed_effect = (property_node.attribute('amt').value.to_f / 1_000.0).round(1)
    end
  end
  properties
end