| Total Complexity | 4 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | def set_Coords(self, Coords): |
||
| 2 | """ |
||
| 3 | Set coordinate polygon by given object. |
||
| 4 | Moreover, invalidate self's AlternativeImages |
||
| 5 | (because they will have been cropped with a bbox |
||
| 6 | of the previous polygon). |
||
| 7 | """ |
||
| 8 | if hasattr(self, 'invalidate_AlternativeImage'): |
||
| 9 | # RegionType, TextLineType, WordType, GlyphType: |
||
| 10 | self.invalidate_AlternativeImage() |
||
| 11 | elif hasattr(self, 'parent_object_') and hasattr(self.parent_object_, 'invalidate_AlternativeImage'): |
||
| 12 | # BorderType: |
||
| 13 | self.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
||
| 14 | self.Coords = Coords |
||
| 15 |