(self, raw:dict=None)
| 142 | The semantic meaning may be table border, or text style line like underline and strike-through. |
| 143 | ''' |
| 144 | def __init__(self, raw:dict=None): |
| 145 | raw = raw or {} |
| 146 | # NOTE: real page CS |
| 147 | self._start = fitz.Point(raw.get('start', (0.0, 0.0))) |
| 148 | self._end = fitz.Point(raw.get('end', (0.0, 0.0))) |
| 149 | |
| 150 | if self._start.x > self._end.x or self._start.y > self._end.y: |
| 151 | self._start, self._end = self._end, self._start |
| 152 | |
| 153 | # width, color |
| 154 | super().__init__(raw) # type, color |
| 155 | self.width = raw.get('width', 0.0) # Note this "width" is actually the height of stroke |
| 156 | |
| 157 | # update bbox |
| 158 | super().update_bbox(self._to_rect()) |
| 159 | |
| 160 | |
| 161 | @property |
nothing calls this directly
no test coverage detected