Module: Writexlsx::Worksheet::DrawingXmlWriter
- Included in:
- Writexlsx::Worksheet
- Defined in:
- lib/write_xlsx/worksheet/drawing_xml_writer.rb
Instance Method Summary collapse
-
#write_drawings ⇒ Object
Write the <drawing> elements.
-
#write_legacy_drawing ⇒ Object
Write the <legacyDrawing> element.
-
#write_legacy_drawing_hf ⇒ Object
Write the <legacyDrawingHF> element.
-
#write_picture ⇒ Object
Write the <picture> element.
Instance Method Details
#write_drawings ⇒ Object
Write the <drawing> elements.
10 11 12 |
# File 'lib/write_xlsx/worksheet/drawing_xml_writer.rb', line 10 def write_drawings # :nodoc: increment_rel_id_and_write_r_id('drawing') if drawings? end |
#write_legacy_drawing ⇒ Object
Write the <legacyDrawing> element.
17 18 19 |
# File 'lib/write_xlsx/worksheet/drawing_xml_writer.rb', line 17 def write_legacy_drawing # :nodoc: increment_rel_id_and_write_r_id('legacyDrawing') if has_vml? end |
#write_legacy_drawing_hf ⇒ Object
Write the <legacyDrawingHF> element.
24 25 26 27 28 29 30 31 32 |
# File 'lib/write_xlsx/worksheet/drawing_xml_writer.rb', line 24 def write_legacy_drawing_hf # :nodoc: return unless has_header_vml? # Increment the relationship id for any drawings or comments. @rel_count += 1 attributes = [['r:id', "rId#{@rel_count}"]] @writer.empty_tag('legacyDrawingHF', attributes) end |
#write_picture ⇒ Object
Write the <picture> element.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/write_xlsx/worksheet/drawing_xml_writer.rb', line 37 def write_picture return unless background_image # Increment the relationship id. @rel_count += 1 id = @rel_count attributes = [['r:id', "rId#{id}"]] @writer.empty_tag('picture', attributes) end |