modm_data.pdf2html.figure
1# Copyright 2022, Niklas Hauser 2# SPDX-License-Identifier: MPL-2.0 3 4import math 5from ..utils import Rectangle 6 7 8class Figure: 9 def __init__(self, page, bbox: Rectangle, cbbox: Rectangle = None, paths: list = None): 10 self._page = page 11 self.bbox = bbox 12 self.cbbox = cbbox 13 self._type = "figure" 14 self._paths = paths or [] 15 16 def as_svg(self): 17 return None 18 19 def __repr__(self) -> str: 20 return f"Figure({int(self.bbox.width)}x{int(self.bbox.height)})"
class
Figure:
9class Figure: 10 def __init__(self, page, bbox: Rectangle, cbbox: Rectangle = None, paths: list = None): 11 self._page = page 12 self.bbox = bbox 13 self.cbbox = cbbox 14 self._type = "figure" 15 self._paths = paths or [] 16 17 def as_svg(self): 18 return None 19 20 def __repr__(self) -> str: 21 return f"Figure({int(self.bbox.width)}x{int(self.bbox.height)})"
Figure( page, bbox: modm_data.utils.math.Rectangle, cbbox: modm_data.utils.math.Rectangle = None, paths: list = None)