setscreen ("offscreenonly")
var forePic, bgPic : int
forePic := Pic.FileNew ("pic1.bmp")
bgPic := Pic.FileNew ("pic2.bmp")
Pic.Draw (forePic, 0, 0, picCopy)
for i : 1 .. Pic.Width (forePic)
for j : 1 .. Pic.Height (forePic)
% These loops analyse each pixel in the foreground picture.
if i mod 2 = 0 and j mod 2 = 0 then
% Select every other pixel. Change this line to change the
% pattern.
/*
Around here you can add lines like
"if whatdotcolour (i,j) = 0 then"
So that you can decide whether or not to follow through with the next line.
*/
drawdot (i, j, colourbg)
% This clause draws the colourbg colour at alternating points,
% but this colour itself is entirely transparent!
end if
end for
end for
forePic := Pic.New (0, 0, Pic.Width (forePic), Pic.Height (forePic))
% Creates the resultant pic.
Pic.Draw (bgPic, 0, 0, picCopy)
Pic.Draw (forePic, 20, 20, picMerge)
% Merge the pictures together.
%Pic.Draw (forePic, 20, 20, picXor)
% For a spooooky effect.
View.Update
|