mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-14 03:17:05 +00:00
experiments/touchbar_rainbow.py: Better rainbow
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
b8b76f34f4
commit
a0f01809ce
1 changed files with 5 additions and 3 deletions
|
@ -18,9 +18,11 @@ buf = u.memalign(0x4000, fb_size)
|
|||
|
||||
colors = [0xDD0000, 0xFE6230, 0xFEF600, 0x00BB00, 0x009BFE, 0x000083, 0x30009B]
|
||||
for i, color in enumerate(colors):
|
||||
lines = stride // len(colors)
|
||||
offset = i * lines * width * 4
|
||||
p.memset32(buf + offset, color, lines * width * 4)
|
||||
lines = width // len(colors)
|
||||
offset = i * lines * stride * 4
|
||||
for j in range(lines):
|
||||
p.memset32(buf + offset + j * stride * 4, color, height * 2)
|
||||
p.memset32(buf + offset + j * stride * 4 + height * 2, 0xffffffff^color, height * 2)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue