初始化生成器 Args: diagram_name: 图表名称 page_width: 页面宽度 page_height: 页面高度
(self, diagram_name: str = "Page-1",
page_width: int = 1169, page_height: int = 827)
| 75 | """ |
| 76 | |
| 77 | def __init__(self, diagram_name: str = "Page-1", |
| 78 | page_width: int = 1169, page_height: int = 827): |
| 79 | """ |
| 80 | 初始化生成器 |
| 81 | |
| 82 | Args: |
| 83 | diagram_name: 图表名称 |
| 84 | page_width: 页面宽度 |
| 85 | page_height: 页面高度 |
| 86 | """ |
| 87 | self.diagram_name = diagram_name |
| 88 | self.page_width = page_width |
| 89 | self.page_height = page_height |
| 90 | self.next_id = 2 # ID 从 2 开始(0 和 1 被根节点和图层占用) |
| 91 | |
| 92 | def _get_next_id(self) -> int: |
| 93 | """获取下一个可用 ID""" |
nothing calls this directly
no outgoing calls
no test coverage detected