Esempio n. 1
0
def create_new_doc(config):
    doc = sk_model.SKDocument(config)
    layout = sk_model.SKLayout()
    doc.childs.append(layout)
    doc.layout = layout
    doc.childs.append(sk_model.SKLayer())
    grid = sk_model.SKGrid()
    doc.childs.append(grid)
    doc.grid = grid
    glayer = sk_model.SKGuideLayer()
    doc.childs.append(glayer)
    doc.guidelayer = glayer
    return doc
Esempio n. 2
0
 def layout(self, *args):
     if not isinstance(args[0], tuple):
         pformat = args[0]
         orientation = args[1]
         if not pformat in sk_const.PAGE_FORMATS.keys(): pformat = 'A4'
         size = sk_const.PAGE_FORMATS[pformat]
     else:
         pformat = ''
         size = args[0]
         orientation = args[1]
     obj = sk_model.SKLayout(pformat, size, orientation)
     self.add_object(obj, self.model)
     self.model.layout = obj