MCPcopy
hub / github.com/ArtifexSoftware/pdf2docx / _to_rect

Method _to_rect

pdf2docx/shape/Shape.py:260–265  ·  view source on GitHub ↗

Convert centerline to rectangle shape.

(self)

Source from the content-addressed store, hash-verified

258
259
260 def _to_rect(self):
261 '''Convert centerline to rectangle shape.'''
262 h = self.width / 2.0
263 x0, y0 = self._start
264 x1, y1 = self._end
265 return (x0-h, y0-h, x1+h, y1+h)
266
267
268class Fill(Shape):

Callers 2

__init__Method · 0.95
update_bboxMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected