Changeset 120
- Timestamp:
- 07/03/07 15:53:33 (1 year ago)
- Files:
-
- doc/CNS2007/poster_cns2007.py (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doc/CNS2007/poster_cns2007.py
r119 r120 106 106 x = margins['left'] + pagewidth/2.0 - p_width/2.0 107 107 y = pagetop - f_height 108 109 poster.roundRect(margins['left'],y,pagewidth,f_height,2*cm, fill=1) 108 110 title_frame = Frame(x, y, p_width, f_height, showBoundary=False) 109 111 title_frame.addFromList(title_components, poster) … … 112 114 print_logo(logo_right, "right", y, f_height) 113 115 114 poster.roundRect(margins['left'],y,pagewidth,f_height,2*cm)116 115 117 116 118 title_bottom = y - titlesep … … 123 125 topPadding=pad, showBoundary=_debug) 124 126 127 poster.roundRect(x,y-height,width,height,1*cm,fill=1) 125 128 paragraph_list = [Paragraph(p, styles['BodyText']) for p in text.split("\n\n")] 126 129 frame.addFromList(paragraph_list, poster) 127 poster.roundRect(x,y-height,width,height,1*cm)130 128 131 129 132 def make_deflist_frame(styles,definition_list,x,y,width,height,_debug): … … 143 146 scale_style(styles['BodyText'], 0.99) 144 147 styles['BodyText'].alignment = TA_JUSTIFY # otherwise we get a 'bad align' error 145 148 146 149 paragraph_list = [Paragraph('<font color="darkgreen"><b>%s</b></font> %s' % item, styles['BodyText']) for item in definition_list] 150 151 poster.roundRect(x,y-height,width,height,1*cm,fill=1) 147 152 frame.addFromList(paragraph_list, poster) 148 poster.roundRect(x,y-height,width,height,1*cm)153 149 154 150 155 def make_users_guide(styles,x,y,width,height,_debug=False): … … 239 244 leftPadding=0, rightPadding=pad, bottomPadding=pad, 240 245 topPadding=pad) 246 poster.roundRect(x,y-f_height,width,f_height,1*cm,fill=1) 241 247 apidoc_frame1.addFromList(paragraph_list, poster) 242 248 apidoc_frame2.addFromList(paragraph_list, poster) 243 249 assert len(paragraph_list) == 0 244 poster.roundRect(x,y-f_height,width,f_height,1*cm)250 245 251 return x, y-f_height, width, f_height 246 252 … … 312 318 x = x_r - f_width1 - f_width2 313 319 320 poster.roundRect(x,y-f_height,f_width1+f_width2,f_height,1*cm,fill=1) 314 321 frame1 = Frame(x, y-f_height, f_width1, f_height, showBoundary=_debug, 315 322 leftPadding=pad, rightPadding=0, bottomPadding=pad, … … 328 335 #frame3.addFromList(flowables, poster) 329 336 330 poster.roundRect(x,y-f_height,f_width1+f_width2,f_height,1*cm)337 331 338 return x, y-f_height, f_width1+f_width2,f_height 332 339 … … 374 381 path.arc(x,y,x+2*r,y+2*r,startAng=180,extent=90) 375 382 path.lineTo(x+w1-r,y) 376 path.arc (x+w1-2*r,y+2*r,x+w1,y,startAng=270,extent=90)383 path.arcTo(x+w1-2*r,y+2*r,x+w1,y,startAng=270,extent=90) 377 384 path.lineTo(x+w1,y+h2-r) 378 path.arc (x+w1-2*r,y+h2-2*r,x+w1,y+h2,startAng=0,extent=90)385 path.arcTo(x+w1-2*r,y+h2-2*r,x+w1,y+h2,startAng=0,extent=90) 379 386 path.lineTo(x+w2+r,y+h2) 380 path.arc(x+w2,y+h2,x+w2+2*r,y+h2+2*r,startAng=180,extent=90) 381 path.moveTo(x+w2,y+h2+r) 387 path.arcTo(x+w2,y+h2,x+w2+2*r,y+h2+2*r,startAng=270,extent=-90) 382 388 path.lineTo(x+w2, y+h1-r) 383 path.arc (x+w2-2*r,y+h1-2*r,x+w2,y+h1,startAng=0,extent=90)389 path.arcTo(x+w2-2*r,y+h1-2*r,x+w2,y+h1,startAng=0,extent=90) 384 390 path.lineTo(x+r, y+h1) 385 path.arc (x,y+h1-2*r,x+2*r,y+h1,startAng=90,extent=90)391 path.arcTo(x,y+h1-2*r,x+2*r,y+h1,startAng=90,extent=90) 386 392 path.lineTo(x, y+r) 387 poster.drawPath(path )393 poster.drawPath(path,fill=1) 388 394 389 395 def huge_url(x,y,width): … … 400 406 poster.drawCentredString(x,y,"http://neuralensemble.org/PyNN") 401 407 poster.restoreState() 408 409 def paint_background(colour): 410 global poster 411 poster.setFillColor(getattr(colors,colour)) 412 poster.rect(0,0,poster._pagesize[0],poster._pagesize[1],fill=1) 413 poster.setFillColor(colors.white) 402 414 403 415 # ============================================================================== … … 496 508 pageright = poster._pagesize[0] - margins['right'] 497 509 510 paint_background('oldlace') 511 498 512 title_bottom = make_title(getStyleSheet(36, 72), TITLE, AUTHORS, INSTITUTIONS, "pynn_tree2.png", "facetslogoweb.gif") 499 513 # logos … … 511 525 #make_users_guide(getStyleSheet(15),margins['left']+colwidth+colsep, title_bottom, colwidth, colheight, DEBUG) 512 526 x_ex,y_ex,w_ex,h_ex = make_example(getStyleSheet(10.5,36), x_api-colsep, title_bottom, colwidth, colheight, DEBUG) 527 make_fancy_box(x_ex, margins['bottom'],w_ex+colsep+w_api,w_ex,y_ex-colsep-margins['bottom'],y_api-colsep-margins['bottom']) 513 528 make_example_figure("VAbenchmark_CUBA_exc.png", x_ex, y_ex-colsep, w_ex, y_ex-colsep-margins['bottom'], DEBUG) 514 529 make_example_figure_caption(CAPTIONS["VAbenchmark_CUBA_exc.png"], x_api-colsep, y_api-colsep, w_api+colsep, y_api-colsep-margins['bottom'], DEBUG) 515 make_fancy_box(x_ex, margins['bottom'],w_ex+colsep+w_api,w_ex,y_ex-colsep-margins['bottom'],y_api-colsep-margins['bottom'])530 516 531 517 532 make_deflist_frame(getStyleSheet(36, 72),QA, margins['left'], title_bottom, x_ex-margins['left']-colsep, colheight, DEBUG)

