Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio.Graphics.GenomeDiagram._AbstractDrawer.AbstractDrawer.set_page_size (   self,
  pagesize,
  orientation 
)
set_page_size(self, pagesize, orientation)

    o pagesize      Size of the output image, a tuple of pixels (width,
            height, or a string in the reportlab.lib.pagesizes
            set of ISO sizes.

    o orientation   String: 'landscape' or 'portrait'

    Set the size of the drawing

Definition at line 411 of file _AbstractDrawer.py.

References Bio.Graphics.GenomeDiagram._AbstractDrawer.AbstractDrawer.pagesize.

Referenced by Bio.Graphics.GenomeDiagram._AbstractDrawer.AbstractDrawer.__init__().

00411 
    def set_page_size(self, pagesize, orientation):
        """ set_page_size(self, pagesize, orientation)

            o pagesize      Size of the output image, a tuple of pixels (width,
                            height, or a string in the reportlab.lib.pagesizes
                            set of ISO sizes.

            o orientation   String: 'landscape' or 'portrait'

            Set the size of the drawing
        """
        if type(pagesize) == type('a'):     # A string, so translate
            pagesize = page_sizes(pagesize)
        elif type(pagesize) == type((1,2)): # A tuple, so don't translate
            pagesize = pagesize
        else:
            raise ValueError, "Page size %s not recognised" % pagesize        
        shortside, longside = min(pagesize), max(pagesize)

        orientation = orientation.lower()
        if orientation not in ('landscape', 'portrait'):
            raise ValueError, "Orientation %s not recognised" % orientation
        if orientation == 'landscape':
            self.pagesize = (longside, shortside)
        else:
            self.pagesize = (shortside, longside)


Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index