Class: OoxmlParser::TransformEffect
- Inherits:
-
Object
- Object
- OoxmlParser::TransformEffect
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb
Instance Attribute Summary collapse
-
#child_extent ⇒ Object
Returns the value of attribute child_extent.
-
#child_offset ⇒ Object
Returns the value of attribute child_offset.
-
#extents ⇒ Object
Returns the value of attribute extents.
-
#offset ⇒ Object
Returns the value of attribute offset.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(offset = nil, extents = nil) ⇒ TransformEffect
constructor
A new instance of TransformEffect.
Constructor Details
#initialize(offset = nil, extents = nil) ⇒ TransformEffect
Returns a new instance of TransformEffect.
6 7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb', line 6 def initialize(offset = nil, extents = nil) @offset = offset @extents = extents end |
Instance Attribute Details
#child_extent ⇒ Object
Returns the value of attribute child_extent.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb', line 4 def child_extent @child_extent end |
#child_offset ⇒ Object
Returns the value of attribute child_offset.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb', line 4 def child_offset @child_offset end |
#extents ⇒ Object
Returns the value of attribute extents.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb', line 4 def extents @extents end |
#offset ⇒ Object
Returns the value of attribute offset.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb', line 4 def offset @offset end |
Class Method Details
.parse(transform_effect_node) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/shape/shape_properties/transform_effect.rb', line 11 def self.parse(transform_effect_node) transform_effect = TransformEffect.new transform_effect_node.xpath('*').each do |transform_effect_node_child| case transform_effect_node_child.name when 'ext' transform_effect.extents = OOXMLShift.parse(transform_effect_node_child, 'cx', 'cy') when 'off' transform_effect.offset = OOXMLShift.parse(transform_effect_node_child) when 'chOff' transform_effect.child_offset = OOXMLShift.parse(transform_effect_node_child) when 'chExt' transform_effect.child_extent = OOXMLShift.parse(transform_effect_node_child, 'cx', 'cy') end end transform_effect end |