Class: OoxmlParser::DocxShapeProperties
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::DocxShapeProperties
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb
Instance Attribute Summary collapse
-
#blip_fill ⇒ Object
Returns the value of attribute blip_fill.
-
#custom_geometry ⇒ Object
Returns the value of attribute custom_geometry.
-
#fill_color ⇒ Object
(also: #fill)
Returns the value of attribute fill_color.
-
#line ⇒ Object
Returns the value of attribute line.
-
#preset_geometry ⇒ Object
(also: #preset)
Returns the value of attribute preset_geometry.
-
#shape_size ⇒ Object
(also: #transform)
Returns the value of attribute shape_size.
-
#text_box ⇒ Object
Returns the value of attribute text_box.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ DocxShapeProperties
constructor
A new instance of DocxShapeProperties.
-
#parse(node) ⇒ DocxShapeProperties
Parse DocxShapeProperties object.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ DocxShapeProperties
Returns a new instance of DocxShapeProperties.
18 19 20 21 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 18 def initialize(parent: nil) @line = DocxShapeLine.new @parent = parent end |
Instance Attribute Details
#blip_fill ⇒ Object
Returns the value of attribute blip_fill.
12 13 14 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 12 def blip_fill @blip_fill end |
#custom_geometry ⇒ Object
Returns the value of attribute custom_geometry.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 11 def custom_geometry @custom_geometry end |
#fill_color ⇒ Object Also known as: fill
Returns the value of attribute fill_color.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 11 def fill_color @fill_color end |
#line ⇒ Object
Returns the value of attribute line.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 11 def line @line end |
#preset_geometry ⇒ Object Also known as: preset
Returns the value of attribute preset_geometry.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 11 def preset_geometry @preset_geometry end |
#shape_size ⇒ Object Also known as: transform
Returns the value of attribute shape_size.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 11 def shape_size @shape_size end |
#text_box ⇒ Object
Returns the value of attribute text_box.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 11 def text_box @text_box end |
Instance Method Details
#parse(node) ⇒ DocxShapeProperties
Parse DocxShapeProperties object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb', line 26 def parse(node) @fill_color = DocxColor.new(parent: self).parse(node) node.xpath('*').each do |node_child| case node_child.name when 'xfrm' @shape_size = DocxShapeSize.new(parent: self).parse(node_child) when 'prstGeom' @preset_geometry = PresetGeometry.new(parent: self).parse(node_child) when 'txbx' @text_box = TextBox.parse_list(node_child) when 'ln' @line = DocxShapeLine.new(parent: self).parse(node_child) when 'blipFill' @blip_fill = BlipFill.new(parent: self).parse(node_child) when 'custGeom' @preset_geometry = PresetGeometry.new(parent: self).parse(node_child) @preset_geometry.name = :custom @custom_geometry = OOXMLCustomGeometry.new(parent: self).parse(node_child) end end self end |