Advertisement
Serafim

Untitled

Oct 21st, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace App:Views:Layout:
  2.   class Header
  3.     constructor: ->
  4.       @scene = new Boo.Scene 320, 31
  5.       ctx = @scene.context
  6.  
  7.       ctx.id 'header.panel',
  8.         color: '#550506'
  9.         stroke: '#3e0305'
  10.  
  11.       ctx.id 'header.text',
  12.         font:
  13.           family: 'Arial'
  14.           weight: 'bold'
  15.           size:   15
  16.           align:  'center'
  17.           variant: 'small-caps'
  18.         color: '#fff'
  19.         shadow:
  20.           color: '#2f0103'
  21.           top: 1
  22.  
  23.  
  24.       @scene.append (ctx) =>
  25.         ctx.save()
  26.         ctx.style 'header.panel'
  27.         ctx.rect [0, 0],  [@scene.resolution.width, 30]
  28.         ctx.line [0, 30], [@scene.resolution.width, 30]
  29.         ctx.style 'header.text'
  30.         ctx.text 'КОРРУПЦИЯ', [@scene.resolution.width/2, 7]
  31.         ctx.restore()
  32.  
  33.       @scene.drawAll()
  34.  
  35.  
  36.     draw: (ctx) ->
  37.       ctx.drawImage @scene.view, 0, 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement