fnction kuis2u(MInput:Matriks):Matriks;
var
i,j,r: integer;
MOutput : Matriks;
begin
SetLength(MOutput,Length(MInput), Length(MInput[0]));
r:=Length(Moutput) div 2;
for i:= 0 to Length(MOutput)-1 do
begin
for j:= 0 to Length(MOutput[0])-1 do
begin
if (((i-r)*(i-r)+(j-r)*(j-r))<=r*r) and ((i+j <= r) or (j>=r+i) or (i>= r+j ) or (i+j >= length(MOutput)+r))then
MOutput[i,j]:= 255-MInput[i,j]
else
MOutput[i,j]:=MInput[i,j]
end;
end;
kuis2:=MOutput;
end;
No comments:
Post a Comment