mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-16 00:13:00 +00:00
30 lines
636 B
Python
Executable File
30 lines
636 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import locale
|
|
from notcurses import notcurses
|
|
|
|
def demo():
|
|
nc = notcurses.Notcurses()
|
|
stdplane = nc.stdplane()
|
|
dims = stdplane.getDimensions()
|
|
r = 0x80
|
|
g = 0x80
|
|
b = 0x80
|
|
for y in range(dims[0]):
|
|
for x in range(dims[1]):
|
|
stdplane.setFgRGB(r, g, b)
|
|
stdplane.setBgRGB(b, r, g)
|
|
stdplane.putEGCYX(y, x, "X")
|
|
b = b + 2
|
|
if b == 256:
|
|
b = 0
|
|
g = g + 2
|
|
if g == 256:
|
|
g = 0
|
|
r = r + 2
|
|
nc.render()
|
|
|
|
|
|
locale.setlocale(locale.LC_ALL, "")
|
|
demo()
|