Changeset 457

Show
Ignore:
Timestamp:
09/02/08 14:40:56 (3 months ago)
Author:
apdavison
Message:

Changed poster to portrait format

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/poster/trunk/poster.py

    r456 r457  
    55 
    66from reportlab.pdfgen.canvas import Canvas 
    7 from reportlab.lib.pagesizes import A0, landscape 
     7from reportlab.lib.pagesizes import A0, landscape, portrait 
    88from reportlab.lib.units import cm 
    99from reportlab.lib import colors 
     
    320320        title_frame.addFromList(title_components, self) 
    321321     
    322         self.print_logo(logo_left, "left", y, f_height
    323         self.print_logo(logo_right, "right", y, f_height)       
     322        self.print_logo(logo_left, "left", y, f_height, maxwidth=0.06*self.pagewidth
     323        self.print_logo(logo_right, "right", y, f_height, maxwidth=0.08*self.pagewidth)       
    324324     
    325325        self.title_bottom = y - titlesep 
     
    338338        logo_width = min(maxwidth, logo_height/hw_ratio) 
    339339        logo_height = logo_width*hw_ratio 
    340         y = y + (f_height-logo_height)/2.0 
     340        y = y + (f_height-logo_height)/2.5 
    341341        if position == 'left': 
    342342            x = 2*self.margins['left'] 
     
    386386        self.roundRect(x, y-height, width, height, 1*cm, fill=1) 
    387387        frame.addFromList(paragraph_list, self) 
    388         column.bottom -= height 
     388        column.bottom -= (height + self.colsep) 
    389389     
    390390    def make_footer(self, text, fontsize=24, color=colors.white): 
     
    510510    titlesep = 2*cm 
    511511 
    512     poster = Poster(FILENAME, ncol=3
     512    poster = Poster(FILENAME, ncol=2, pagesize=portrait(A0)
    513513    poster.set_metadata(AUTHORS, TITLE, SUBJECT) 
    514514    poster.paint_background(BACKGROUND['img'], credit=BACKGROUND['credit']) 
     
    524524    #make_users_guide(getStyleSheet(15),margins['left']+colwidth+colsep, title_bottom, colwidth, colheight, DEBUG) 
    525525     
    526     poster.add_figure_frame(1, "architecture_of_PyNN_v0.5.png", height=None, ncol=2, _debug=DEBUG) 
    527     print [col.bottom for col in poster.columns] 
    528      
     526    arch_img = PIL.Image.open("architecture_of_PyNN_v0.5.png") 
     527    arch_img_height = arch_img.size[1]*poster.pagewidth/arch_img.size[0] 
     528     
     529    intro_height = poster.colheight - arch_img_height - poster.colsep 
     530     
     531    poster.add_frame(0, styles=getStyleSheet(36, 72), height=intro_height, content=QA) 
     532       
    529533    poster.make_example(1, getStyleSheet(10.5,36), poster.colheight, DEBUG) 
    530534     
    531535#    make_fancy_box(x_ex, margins['bottom'],w_ex+colsep+w_api,w_ex,y_ex-colsep-margins['bottom'],y_api-colsep-margins['bottom']) 
    532     poster.add_figure_frame(2, "VAbenchmark_CUBA_exc.png", height=FILL_TO_BOTTOM, 
     536 
     537    fig_height = poster.columns[1].bottom - poster.columns[0].bottom - poster.colsep 
     538    print poster.columns[0].bottom, poster.columns[1].bottom, fig_height 
     539 
     540    poster.add_figure_frame(1, "VAbenchmark_CUBA_exc.png", height=fig_height, 
    533541                            caption=CAPTIONS["VAbenchmark_CUBA_exc.png"], 
    534542                            caption_styles=getStyleSheet(20, 72), _debug=DEBUG) 
    535543     
    536     poster.add_frame(0, styles=getStyleSheet(36, 72), height=FILL_TO_BOTTOM, content=QA
     544    poster.add_figure_frame(0, "architecture_of_PyNN_v0.5.png", height=None, ncol=2, _debug=DEBUG
    537545 
    538546    poster.make_footer(ACKNOWLEDGEMENTS)