Esempio n. 1
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}
Esempio n. 2
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}
Esempio n. 3
0
 def convertToDict(self):
     dictionary = lib.getDictFromVariables(['x', 'y', 'width', 
                                            'height',  'type', 'text'], self)
     dictionary['text_data'] = self.text_data.convertToDict()
     return {'DataBox': dictionary}