27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/rubyword/element/image.rb', line 27
def write(section=nil, xml=nil)
@xml = xml
image = self.images.pop
@xml.send('w:p') {
@xml.send('w:pPr')
@xml.send('w:r') {
@xml.send('w:pict') {
@xml.send('v:shape', 'type' => '#_x0000_t75', 'style' => "width:#{image[:width]}px; height:#{image[:height]}px; margin-left:0px; margin-top:0px; mso-position-horizontal:left; mso-position-vertical:top; mso-position-horizontal-relative:char; mso-position-vertical-relative:line;") {
@xml.send('w10:wrap', 'type' => 'inline', 'anchorx' => 'page', 'anchory' => 'page')
@xml.send('v:imagedata', 'r:id' => "rId#{image[:rid]}", 'o:title' => '')
}
}
}
}
end
|