Пример #1
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(
         ["face", "size", "line_space", "letter_space", "justification", "angle"], self
     )
     dictionary["style"] = repr(self.style).split(" ")[1].strip("PANGO_")
     dictionary["weight"] = repr(self.weight).split(" ")[1].strip("PANGO_")
     return {"TextData": dictionary}
Пример #2
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables([
         'face', 'size', 'line_space', 'letter_space', 'justification',
         'angle', 'language'
     ], self)
     dictionary['style'] = repr(self.style).split(' ')[1].strip('PANGO_')
     dictionary['weight'] = repr(self.weight).split(' ')[1].strip('PANGO_')
     return {'TextData': dictionary}
Пример #3
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(
         ['pixel_width', 'pixel_height', 'image_path', 'resolution'], self)
     data_boxes_converted = [
         data_box.convertToDict() for data_box in self.data_boxes
     ]
     dictionary['data_boxes'] = data_boxes_converted
     return {'PageData': dictionary}
Пример #4
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(["pixel_width", "pixel_height", "image_path", "resolution"], self)
     data_boxes_converted = [data_box.convertToDict() for data_box in self.data_boxes]
     dictionary["data_boxes"] = data_boxes_converted
     return {"PageData": dictionary}
Пример #5
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(["x", "y", "width", "height", "type", "text"], self)
     dictionary["text_data"] = self.text_data.convertToDict()
     return {"DataBox": dictionary}
Пример #6
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(['face', 'size', 'line_space',
                                            'letter_space', 'justification', 'angle', 'language'], self)
     dictionary['style'] = repr(self.style).split(' ')[1].strip('PANGO_')
     dictionary['weight'] = repr(self.weight).split(' ')[1].strip('PANGO_')
     return {'TextData': dictionary}
Пример #7
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(['pixel_width', 'pixel_height', 'image_path', 'resolution'], self)
     data_boxes_converted = [data_box.convertToDict() for data_box in self.data_boxes]
     dictionary['data_boxes'] = data_boxes_converted
     return {'PageData': dictionary}
Пример #8
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(['x', 'y', 'width',
                                            'height',  'type', 'text'], self)
     dictionary['text_data'] = self.text_data.convertToDict()
     return {'DataBox': dictionary}
Пример #9
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(
         ['x', 'y', 'width', 'height', 'type', 'text'], self)
     dictionary['text_data'] = self.text_data.convertToDict()
     return {'DataBox': dictionary}