demos/01_buffer.py
changeset 95 05392e369ede
parent 92 b97c4e25ed6d
child 117 8680c2333546
equal deleted inserted replaced
94:e50dae408fe9 95:05392e369ede
     5 from tuikit.core.buffer import Buffer
     5 from tuikit.core.buffer import Buffer
     6 from tuikit.driver.driver import Driver
     6 from tuikit.driver.driver import Driver
     7 
     7 
     8 
     8 
     9 buffer = Buffer(16, 8)
     9 buffer = Buffer(16, 8)
    10 buffer.fill(c='#')
    10 buffer.fill('#')
    11 buffer.hline(1, 1, 14, c='-')
    11 buffer.hline('-', 1, 1, 14)
    12 buffer.hline(1, 6, 14, c='-')
    12 buffer.hline('-', 1, 6, 14)
    13 buffer.vline(7, 2, 4, c='|')
    13 buffer.vline('|', 7, 2, 4)
    14 buffer.puts(8, 4, 'Hello!')
    14 buffer.puts('Hello!', 8, 4)
    15 buffer.frame()
    15 buffer.frame()
    16 
    16 
    17 driver = Driver()
    17 driver = Driver()
    18 driver.init()
    18 driver.init()
    19 driver.draw(buffer)
    19 driver.draw(buffer)