def drawFirstPortrait(canv, doc): """ This is the Title Page Template (Portrait Oriented) """ canv.saveState() #set Page Size frame, pagesize = doc.getFrame(doc.template_id) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame="First") canv.restoreState()
def drawLaterSpecialPortrait(canv, doc): """ This is the Template of any following Portrait Oriented Page """ canv.saveState() #set Page Size frame, pagesize = doc.getFrame(doc.template_id) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame="Later") canv.restoreState()
def drawLaterSpecialLandscape(canv, doc): """ This is the Template of any later drawn Landscape Oriented Page """ canv.saveState() #set Page Size and #some variables frame, pagesize = doc.getFrame(doc.template_id) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame="Later") canv.restoreState()
def drawFirstLandscape(canv, doc): """ This is the Template of any later drawn Landscape Oriented Page the frame object is only used as a reference to be able to draw to the canvas After creation a Frame is not usually manipulated directly by the applications program -- it is used internally by the platypus modules. Here is a diagramatic abstraction for the definitional part of a Frame:: width x2,y2 +---------------------------------+ | l top padding r | h | e +-------------------------+ i | e | f | | g | i | t | | h | g | | | t | h | p | | | t | a | | p | | d | | a | | | | d | | +-------------------------+ | | bottom padding | +---------------------------------+ (x1,y1) <-- lower left corner NOTE!! Frames are stateful objects. No single frame should be used in two documents at the same time (especially in the presence of multithreading. """ canv.saveState() #set Page Size frame, pagesize = doc.getFrame(doc.template_id) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame="First") canv.restoreState()