Ejemplo n.º 1
0
 def layout(self, layout):
     temp = Layout()
     if "layout" in layout:
         temp.layout = layout['layout']
     if "showName" in layout:
         temp.showName = layout['showName']
     if "showID" in layout:
         temp.showID = layout['showID']
     self.__layout = temp
Ejemplo n.º 2
0
 def test_units(self):
     """ Capture absence of units. """
     layout = Layout()
     layout.units = None
     layout.layers.append(Layer())
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
Ejemplo n.º 3
0
 def test_images(self):
     """ Capture images with no data. """
     layer = Layer()
     layer.images.append(Image())
     layout = Layout()
     layout.units = 'mm'
     layout.layers.append(layer)
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
Ejemplo n.º 4
0
 def layout(self, layout):
     temp = Layout()
     if "layout" in layout:
         temp.layout = layout['layout']
     if "showName" in layout:
         temp.showName = layout['showName']
     if "showID" in layout:
         temp.showID = layout['showID']
     if "showAggregateScores" in layout:
         temp.showAggregateScores = layout['showAggregateScores']
     if "countUnscored" in layout:
         temp.countUnscored = layout['countUnscored']
     if 'aggregateFunction' in layout:
         temp.aggregateFunction = layout['aggregateFunction']
     self.__layout = temp
Ejemplo n.º 5
0
def layout_factory(bg_img: Image.Image, group_box_list: list, out_put_dir,
                   rotate_angle_range, strategy_list) -> Layout:
    """
    生成layout的工厂方法
    :param bg_img:
    :param group_box_list:
    :param out_put_dir:
    :param rotate_angle_range:
    :param strategy_list:
    :return:
    """
    from service import text_img_provider
    layout = Layout(bg_img=bg_img,
                    out_put_dir=out_put_dir,
                    group_box_list=group_box_list,
                    next_block_generator=text_img_provider,
                    rotate_angle_range=rotate_angle_range,
                    strategy_list=strategy_list)
    return layout
Ejemplo n.º 6
0
def launch_os(data, default=False):
    print(curtime() + ' : Start OS')
    test = Layout(data, default)
    test.show()