Method: IsoDoc::PresentationXMLConvert#svg_emf_double

Defined in:
lib/isodoc/presentation_function/image.rb

#svg_emf_double(img) ⇒ Object



123
124
125
126
127
128
129
130
131
132
133
# File 'lib/isodoc/presentation_function/image.rb', line 123

def svg_emf_double(img)
  if emf?(img["mimetype"])
    img = emf_encode(img)
    # img.children.first.previous = emf_to_svg(img)
    img.add_first_child emf_to_svg(img)
  elsif img["mimetype"] == "image/svg+xml"
    src = svg_to_emf(img) or return
    img.add_child("<emf/>")
    img.elements.last["src"] = src
  end
end