123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- from abc import ABC, abstractmethod
- class BaseDrawer(ABC):
- def __init__(self, obj, msp, style):
- self.obj = obj
- self.msp = msp
- self.style = style
- @abstractmethod
- def initialize_data(self):
- pass
- @abstractmethod
- def draw_agg(self):
- pass
- @abstractmethod
- def draw_div(self):
- pass
- def draw(self):
- self.initialize_data()
- self.draw_agg()
- self.draw_div()
- class VentGraphDrawer(BaseDrawer, ABC):
- def __init__(self, obj, msp, style):
- super().__init__(obj, msp, style)
- @abstractmethod
- def initialize_data(self):
- pass
- def draw_agg(self):
- self.draw_obj(self.obj.center.agg_point, self.obj.middle_line.agg_route)
- def draw_div(self):
- self.draw_obj(self.obj.center.div_point, self.obj.middle_line.div_route)
- @abstractmethod
- def draw_obj(self, center, route):
- pass
|