MCPcopy Index your code
hub / github.com/clips/pattern / place_image

Method place_image

pattern/web/pdf/converter.py:280–288  ·  view source on GitHub ↗
(self, item, borderwidth, x, y, w, h)

Source from the content-addressed store, hash-verified

278 return
279
280 def place_image(self, item, borderwidth, x, y, w, h):
281 if self.outdir is not None:
282 name = self.write_image(item)
283 self.write('<img src="%s" border="%d" style="position:absolute; left:%dpx; top:%dpx;" '
284 'width="%d" height="%d" />\n' %
285 (enc(name), borderwidth,
286 x*self.scale, (self._yoffset-y)*self.scale,
287 w*self.scale, h*self.scale))
288 return
289
290 def place_text(self, color, text, x, y, size):
291 color = self.text_colors.get(color)

Callers 1

renderMethod · 0.95

Calls 3

writeMethod · 0.95
encFunction · 0.90
write_imageMethod · 0.80

Tested by

no test coverage detected