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

Method place_rect

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

Source from the content-addressed store, hash-verified

264 return
265
266 def place_rect(self, color, borderwidth, x, y, w, h):
267 color = self.rect_colors.get(color)
268 if color is not None:
269 self.write('<span style="position:absolute; border: %s %dpx solid; '
270 'left:%dpx; top:%dpx; width:%dpx; height:%dpx;"></span>\n' %
271 (color, borderwidth,
272 x*self.scale, (self._yoffset-y)*self.scale,
273 w*self.scale, h*self.scale))
274 return
275
276 def place_border(self, color, borderwidth, item):
277 self.place_rect(color, borderwidth, item.x0, item.y1, item.width, item.height)

Callers 1

place_borderMethod · 0.95

Calls 2

writeMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected