Save the VisualizationInfo and related objects to a BCF zip file. Args: bcf_zip: The BCF zip file to save to. topic_dir: The directory in the BCF zip file to save to. vpt: The ViewPoint to save.
(
self,
bcf_zip: ZipFileInterface,
topic_dir: str,
vpt: mdl.ViewPoint,
)
| 114 | return bitmaps_dict |
| 115 | |
| 116 | def save( |
| 117 | self, |
| 118 | bcf_zip: ZipFileInterface, |
| 119 | topic_dir: str, |
| 120 | vpt: mdl.ViewPoint, |
| 121 | ) -> None: |
| 122 | """ |
| 123 | Save the VisualizationInfo and related objects to a BCF zip file. |
| 124 | |
| 125 | Args: |
| 126 | bcf_zip: The BCF zip file to save to. |
| 127 | topic_dir: The directory in the BCF zip file to save to. |
| 128 | vpt: The ViewPoint to save. |
| 129 | """ |
| 130 | if not (vp_name := vpt.viewpoint): |
| 131 | return |
| 132 | self._save_visinfo(bcf_zip, topic_dir, vp_name) |
| 133 | self._save_snapshot(bcf_zip, topic_dir, vpt.snapshot) |
| 134 | self._save_bitmaps(bcf_zip, topic_dir) |
| 135 | |
| 136 | def _save_snapshot(self, bcf_zip: ZipFileInterface, topic_dir: str, filename: Optional[str]) -> None: |
| 137 | if bool(self.snapshot) ^ bool(filename): |
nothing calls this directly
no test coverage detected