|
2 | 2 | # -*- coding: utf-8 -*-
|
3 | 3 |
|
4 | 4 | #
|
5 |
| -# Generated Sat Oct 31 00:32:57 2020 by generateDS.py version 2.35.20. |
| 5 | +# Generated Sat Oct 31 00:47:39 2020 by generateDS.py version 2.35.20. |
6 | 6 | # Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
|
7 | 7 | #
|
8 | 8 | # Command line options:
|
@@ -3067,6 +3067,17 @@ def invalidate_AlternativeImage(self, feature_selector=None):
|
3067 | 3067 | for image in removed_images:
|
3068 | 3068 | self.gds_collector_.add_message('Removing AlternativeImage %s from "%s"' % (
|
3069 | 3069 | image.get_comments() or '', name))
|
| 3070 | + def set_orientation(self, orientation): |
| 3071 | + """ |
| 3072 | + Set deskewing angle to given number. |
| 3073 | + Moreover, invalidate self's AlternativeImages |
| 3074 | + (because they will have been rotated and enlarged |
| 3075 | + with the angle of the previous value). |
| 3076 | + """ |
| 3077 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 3078 | + # PageType, RegionType: |
| 3079 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 3080 | + self.orientation = orientation |
3070 | 3081 | # end class PageType
|
3071 | 3082 |
|
3072 | 3083 |
|
@@ -3218,6 +3229,22 @@ def __hash__(self):
|
3218 | 3229 | else:
|
3219 | 3230 | raise ValueError("Cannot hash %s" % self)
|
3220 | 3231 | return hash(val)
|
| 3232 | + def set_points(self, points): |
| 3233 | + """ |
| 3234 | + Set coordinate polygon by given string. |
| 3235 | + Moreover, invalidate the parent's AlternativeImages |
| 3236 | + (because they will have been cropped with a bbox |
| 3237 | + of the previous polygon). |
| 3238 | + """ |
| 3239 | + if hasattr(self, 'parent_object_'): |
| 3240 | + parent = self.parent_object_ |
| 3241 | + if hasattr(parent, 'invalidate_AlternativeImage'): |
| 3242 | + # RegionType, TextLineType, WordType, GlyphType: |
| 3243 | + parent.invalidate_AlternativeImage() |
| 3244 | + elif hasattr(parent, 'parent_object_') and hasattr(parent.parent_object_, 'invalidate_AlternativeImage'): |
| 3245 | + # BorderType: |
| 3246 | + parent.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
| 3247 | + self.points = points |
3221 | 3248 | # end class CoordsType
|
3222 | 3249 |
|
3223 | 3250 |
|
@@ -3695,6 +3722,20 @@ def invalidate_AlternativeImage(self, feature_selector=None):
|
3695 | 3722 | for image in removed_images:
|
3696 | 3723 | self.gds_collector_.add_message('Removing AlternativeImage %s from "%s"' % (
|
3697 | 3724 | image.get_comments() or '', name))
|
| 3725 | + def set_Coords(self, Coords): |
| 3726 | + """ |
| 3727 | + Set coordinate polygon by given object. |
| 3728 | + Moreover, invalidate self's AlternativeImages |
| 3729 | + (because they will have been cropped with a bbox |
| 3730 | + of the previous polygon). |
| 3731 | + """ |
| 3732 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 3733 | + # RegionType, TextLineType, WordType, GlyphType: |
| 3734 | + self.invalidate_AlternativeImage() |
| 3735 | + elif hasattr(self, 'parent_object_') and hasattr(self.parent_object_, 'invalidate_AlternativeImage'): |
| 3736 | + # BorderType: |
| 3737 | + self.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
| 3738 | + self.Coords = Coords |
3698 | 3739 | # end class TextLineType
|
3699 | 3740 |
|
3700 | 3741 |
|
@@ -4140,6 +4181,20 @@ def invalidate_AlternativeImage(self, feature_selector=None):
|
4140 | 4181 | for image in removed_images:
|
4141 | 4182 | self.gds_collector_.add_message('Removing AlternativeImage %s from "%s"' % (
|
4142 | 4183 | image.get_comments() or '', name))
|
| 4184 | + def set_Coords(self, Coords): |
| 4185 | + """ |
| 4186 | + Set coordinate polygon by given object. |
| 4187 | + Moreover, invalidate self's AlternativeImages |
| 4188 | + (because they will have been cropped with a bbox |
| 4189 | + of the previous polygon). |
| 4190 | + """ |
| 4191 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 4192 | + # RegionType, TextLineType, WordType, GlyphType: |
| 4193 | + self.invalidate_AlternativeImage() |
| 4194 | + elif hasattr(self, 'parent_object_') and hasattr(self.parent_object_, 'invalidate_AlternativeImage'): |
| 4195 | + # BorderType: |
| 4196 | + self.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
| 4197 | + self.Coords = Coords |
4143 | 4198 | # end class WordType
|
4144 | 4199 |
|
4145 | 4200 |
|
@@ -4538,6 +4593,20 @@ def invalidate_AlternativeImage(self, feature_selector=None):
|
4538 | 4593 | for image in removed_images:
|
4539 | 4594 | self.gds_collector_.add_message('Removing AlternativeImage %s from "%s"' % (
|
4540 | 4595 | image.get_comments() or '', name))
|
| 4596 | + def set_Coords(self, Coords): |
| 4597 | + """ |
| 4598 | + Set coordinate polygon by given object. |
| 4599 | + Moreover, invalidate self's AlternativeImages |
| 4600 | + (because they will have been cropped with a bbox |
| 4601 | + of the previous polygon). |
| 4602 | + """ |
| 4603 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 4604 | + # RegionType, TextLineType, WordType, GlyphType: |
| 4605 | + self.invalidate_AlternativeImage() |
| 4606 | + elif hasattr(self, 'parent_object_') and hasattr(self.parent_object_, 'invalidate_AlternativeImage'): |
| 4607 | + # BorderType: |
| 4608 | + self.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
| 4609 | + self.Coords = Coords |
4541 | 4610 | # end class GlyphType
|
4542 | 4611 |
|
4543 | 4612 |
|
@@ -7153,6 +7222,20 @@ def __hash__(self):
|
7153 | 7222 | else:
|
7154 | 7223 | raise ValueError("Cannot hash %s" % self)
|
7155 | 7224 | return hash(val)
|
| 7225 | + def set_Coords(self, Coords): |
| 7226 | + """ |
| 7227 | + Set coordinate polygon by given object. |
| 7228 | + Moreover, invalidate self's AlternativeImages |
| 7229 | + (because they will have been cropped with a bbox |
| 7230 | + of the previous polygon). |
| 7231 | + """ |
| 7232 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 7233 | + # RegionType, TextLineType, WordType, GlyphType: |
| 7234 | + self.invalidate_AlternativeImage() |
| 7235 | + elif hasattr(self, 'parent_object_') and hasattr(self.parent_object_, 'invalidate_AlternativeImage'): |
| 7236 | + # BorderType: |
| 7237 | + self.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
| 7238 | + self.Coords = Coords |
7156 | 7239 | # end class BorderType
|
7157 | 7240 |
|
7158 | 7241 |
|
@@ -9022,6 +9105,20 @@ def invalidate_AlternativeImage(self, feature_selector=None):
|
9022 | 9105 | for image in removed_images:
|
9023 | 9106 | self.gds_collector_.add_message('Removing AlternativeImage %s from "%s"' % (
|
9024 | 9107 | image.get_comments() or '', name))
|
| 9108 | + def set_Coords(self, Coords): |
| 9109 | + """ |
| 9110 | + Set coordinate polygon by given object. |
| 9111 | + Moreover, invalidate self's AlternativeImages |
| 9112 | + (because they will have been cropped with a bbox |
| 9113 | + of the previous polygon). |
| 9114 | + """ |
| 9115 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 9116 | + # RegionType, TextLineType, WordType, GlyphType: |
| 9117 | + self.invalidate_AlternativeImage() |
| 9118 | + elif hasattr(self, 'parent_object_') and hasattr(self.parent_object_, 'invalidate_AlternativeImage'): |
| 9119 | + # BorderType: |
| 9120 | + self.parent_object_.invalidate_AlternativeImage(feature_selector='cropped') |
| 9121 | + self.Coords = Coords |
9025 | 9122 | # end class RegionType
|
9026 | 9123 |
|
9027 | 9124 |
|
@@ -10877,6 +10974,17 @@ def __hash__(self):
|
10877 | 10974 | else:
|
10878 | 10975 | raise ValueError("Cannot hash %s" % self)
|
10879 | 10976 | return hash(val)
|
| 10977 | + def set_orientation(self, orientation): |
| 10978 | + """ |
| 10979 | + Set deskewing angle to given number. |
| 10980 | + Moreover, invalidate self's AlternativeImages |
| 10981 | + (because they will have been rotated and enlarged |
| 10982 | + with the angle of the previous value). |
| 10983 | + """ |
| 10984 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 10985 | + # PageType, RegionType: |
| 10986 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 10987 | + self.orientation = orientation |
10880 | 10988 | # end class AdvertRegionType
|
10881 | 10989 |
|
10882 | 10990 |
|
@@ -11018,6 +11126,17 @@ def __hash__(self):
|
11018 | 11126 | else:
|
11019 | 11127 | raise ValueError("Cannot hash %s" % self)
|
11020 | 11128 | return hash(val)
|
| 11129 | + def set_orientation(self, orientation): |
| 11130 | + """ |
| 11131 | + Set deskewing angle to given number. |
| 11132 | + Moreover, invalidate self's AlternativeImages |
| 11133 | + (because they will have been rotated and enlarged |
| 11134 | + with the angle of the previous value). |
| 11135 | + """ |
| 11136 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 11137 | + # PageType, RegionType: |
| 11138 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 11139 | + self.orientation = orientation |
11021 | 11140 | # end class MusicRegionType
|
11022 | 11141 |
|
11023 | 11142 |
|
@@ -11131,6 +11250,17 @@ def __hash__(self):
|
11131 | 11250 | else:
|
11132 | 11251 | raise ValueError("Cannot hash %s" % self)
|
11133 | 11252 | return hash(val)
|
| 11253 | + def set_orientation(self, orientation): |
| 11254 | + """ |
| 11255 | + Set deskewing angle to given number. |
| 11256 | + Moreover, invalidate self's AlternativeImages |
| 11257 | + (because they will have been rotated and enlarged |
| 11258 | + with the angle of the previous value). |
| 11259 | + """ |
| 11260 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 11261 | + # PageType, RegionType: |
| 11262 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 11263 | + self.orientation = orientation |
11134 | 11264 | # end class MapRegionType
|
11135 | 11265 |
|
11136 | 11266 |
|
@@ -11273,6 +11403,17 @@ def __hash__(self):
|
11273 | 11403 | else:
|
11274 | 11404 | raise ValueError("Cannot hash %s" % self)
|
11275 | 11405 | return hash(val)
|
| 11406 | + def set_orientation(self, orientation): |
| 11407 | + """ |
| 11408 | + Set deskewing angle to given number. |
| 11409 | + Moreover, invalidate self's AlternativeImages |
| 11410 | + (because they will have been rotated and enlarged |
| 11411 | + with the angle of the previous value). |
| 11412 | + """ |
| 11413 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 11414 | + # PageType, RegionType: |
| 11415 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 11416 | + self.orientation = orientation |
11276 | 11417 | # end class ChemRegionType
|
11277 | 11418 |
|
11278 | 11419 |
|
@@ -11415,6 +11556,17 @@ def __hash__(self):
|
11415 | 11556 | else:
|
11416 | 11557 | raise ValueError("Cannot hash %s" % self)
|
11417 | 11558 | return hash(val)
|
| 11559 | + def set_orientation(self, orientation): |
| 11560 | + """ |
| 11561 | + Set deskewing angle to given number. |
| 11562 | + Moreover, invalidate self's AlternativeImages |
| 11563 | + (because they will have been rotated and enlarged |
| 11564 | + with the angle of the previous value). |
| 11565 | + """ |
| 11566 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 11567 | + # PageType, RegionType: |
| 11568 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 11569 | + self.orientation = orientation |
11418 | 11570 | # end class MathsRegionType
|
11419 | 11571 |
|
11420 | 11572 |
|
@@ -11558,6 +11710,17 @@ def __hash__(self):
|
11558 | 11710 | else:
|
11559 | 11711 | raise ValueError("Cannot hash %s" % self)
|
11560 | 11712 | return hash(val)
|
| 11713 | + def set_orientation(self, orientation): |
| 11714 | + """ |
| 11715 | + Set deskewing angle to given number. |
| 11716 | + Moreover, invalidate self's AlternativeImages |
| 11717 | + (because they will have been rotated and enlarged |
| 11718 | + with the angle of the previous value). |
| 11719 | + """ |
| 11720 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 11721 | + # PageType, RegionType: |
| 11722 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 11723 | + self.orientation = orientation |
11561 | 11724 | # end class SeparatorRegionType
|
11562 | 11725 |
|
11563 | 11726 |
|
@@ -11766,6 +11929,17 @@ def __hash__(self):
|
11766 | 11929 | else:
|
11767 | 11930 | raise ValueError("Cannot hash %s" % self)
|
11768 | 11931 | return hash(val)
|
| 11932 | + def set_orientation(self, orientation): |
| 11933 | + """ |
| 11934 | + Set deskewing angle to given number. |
| 11935 | + Moreover, invalidate self's AlternativeImages |
| 11936 | + (because they will have been rotated and enlarged |
| 11937 | + with the angle of the previous value). |
| 11938 | + """ |
| 11939 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 11940 | + # PageType, RegionType: |
| 11941 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 11942 | + self.orientation = orientation |
11769 | 11943 | # end class ChartRegionType
|
11770 | 11944 |
|
11771 | 11945 |
|
@@ -12015,6 +12189,17 @@ def __hash__(self):
|
12015 | 12189 | else:
|
12016 | 12190 | raise ValueError("Cannot hash %s" % self)
|
12017 | 12191 | return hash(val)
|
| 12192 | + def set_orientation(self, orientation): |
| 12193 | + """ |
| 12194 | + Set deskewing angle to given number. |
| 12195 | + Moreover, invalidate self's AlternativeImages |
| 12196 | + (because they will have been rotated and enlarged |
| 12197 | + with the angle of the previous value). |
| 12198 | + """ |
| 12199 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 12200 | + # PageType, RegionType: |
| 12201 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 12202 | + self.orientation = orientation |
12018 | 12203 | # end class TableRegionType
|
12019 | 12204 |
|
12020 | 12205 |
|
@@ -12194,6 +12379,17 @@ def __hash__(self):
|
12194 | 12379 | else:
|
12195 | 12380 | raise ValueError("Cannot hash %s" % self)
|
12196 | 12381 | return hash(val)
|
| 12382 | + def set_orientation(self, orientation): |
| 12383 | + """ |
| 12384 | + Set deskewing angle to given number. |
| 12385 | + Moreover, invalidate self's AlternativeImages |
| 12386 | + (because they will have been rotated and enlarged |
| 12387 | + with the angle of the previous value). |
| 12388 | + """ |
| 12389 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 12390 | + # PageType, RegionType: |
| 12391 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 12392 | + self.orientation = orientation |
12197 | 12393 | # end class GraphicRegionType
|
12198 | 12394 |
|
12199 | 12395 |
|
@@ -12373,6 +12569,17 @@ def __hash__(self):
|
12373 | 12569 | else:
|
12374 | 12570 | raise ValueError("Cannot hash %s" % self)
|
12375 | 12571 | return hash(val)
|
| 12572 | + def set_orientation(self, orientation): |
| 12573 | + """ |
| 12574 | + Set deskewing angle to given number. |
| 12575 | + Moreover, invalidate self's AlternativeImages |
| 12576 | + (because they will have been rotated and enlarged |
| 12577 | + with the angle of the previous value). |
| 12578 | + """ |
| 12579 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 12580 | + # PageType, RegionType: |
| 12581 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 12582 | + self.orientation = orientation |
12376 | 12583 | # end class LineDrawingRegionType
|
12377 | 12584 |
|
12378 | 12585 |
|
@@ -12565,6 +12772,17 @@ def __hash__(self):
|
12565 | 12772 | else:
|
12566 | 12773 | raise ValueError("Cannot hash %s" % self)
|
12567 | 12774 | return hash(val)
|
| 12775 | + def set_orientation(self, orientation): |
| 12776 | + """ |
| 12777 | + Set deskewing angle to given number. |
| 12778 | + Moreover, invalidate self's AlternativeImages |
| 12779 | + (because they will have been rotated and enlarged |
| 12780 | + with the angle of the previous value). |
| 12781 | + """ |
| 12782 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 12783 | + # PageType, RegionType: |
| 12784 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 12785 | + self.orientation = orientation |
12568 | 12786 | # end class ImageRegionType
|
12569 | 12787 |
|
12570 | 12788 |
|
@@ -13045,6 +13263,17 @@ def __hash__(self):
|
13045 | 13263 | else:
|
13046 | 13264 | raise ValueError("Cannot hash %s" % self)
|
13047 | 13265 | return hash(val)
|
| 13266 | + def set_orientation(self, orientation): |
| 13267 | + """ |
| 13268 | + Set deskewing angle to given number. |
| 13269 | + Moreover, invalidate self's AlternativeImages |
| 13270 | + (because they will have been rotated and enlarged |
| 13271 | + with the angle of the previous value). |
| 13272 | + """ |
| 13273 | + if hasattr(self, 'invalidate_AlternativeImage'): |
| 13274 | + # PageType, RegionType: |
| 13275 | + self.invalidate_AlternativeImage(feature_selector='deskewed') |
| 13276 | + self.orientation = orientation |
13048 | 13277 | # end class TextRegionType
|
13049 | 13278 |
|
13050 | 13279 |
|
|
0 commit comments