June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
23
Task/Bitmap/Maple/bitmap.maple
Normal file
23
Task/Bitmap/Maple/bitmap.maple
Normal 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:
|
||||
Loading…
Add table
Add a link
Reference in a new issue