Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6581 leency 1
--PICTURE: Rainbow - Dark to Bright v1.1
2
--by Richard Fhager
3
--http://hem.fyristorg.com/dawnbringer/
4
-- Email: dawnbringer@hem.utfors.se
5
-- MSN:   annassar@hotmail.com
6
--
7
 
8
 
9
--dofile("dawnbringer_lib.lua")
10
run("../libs/dawnbringer_lib.lua")
11
--> db.shiftHUE(r,g,b, deg)
12
 
13
w, h = getpicturesize()
14
 
15
for y = 0, h - 1, 1 do
16
  for x = 0, w - 1, 1 do
17
 
18
   -- Fractionalize image dimensions
19
   ox = x / w;
20
   oy = y / h;
21
 
22
   r = 255 * math.sin(oy * 2)
23
   g = (oy-0.5)*512 * oy
24
   b = (oy-0.5)*512 * oy
25
 
26
   r, g, b = db.shiftHUE(r,g,b,ox * 360);
27
 
28
   c = matchcolor(r,g,b)
29
 
30
   putpicturepixel(x, y, c);
31
 
32
  end
33
  updatescreen(); if (waitbreak(0)==1) then return; end
34
end
35