June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,23 @@
allocateImg := proc(width, height)
return Array(1..width, 1..height, 1..3);
end proc:
fillColor := proc(img, rgb::list)
local i;
for i from 1 to 3 do
img[..,..,i] := map(x->rgb[i], img[..,..,i]):
end do:
end proc:
setColor := proc(x, y, img, rgb::list)
local i:
for i from 1 to 3 do
img[x,y,i] := rgb[i]:
end do:
end proc:
getColor := proc(x,y,img)
local rgb,i:
rgb := Array(1..3):
for i from 1 to 3 do
rgb(i) := img[x,y,i]:
end do:
return rgb:
end proc: