x0,y0,x,y - координаты полосы загрузки
a(x0;y0)
b(x;y);
a
b
p - значение полосы от 0 до 100, при введении большего значения берется максимальное
colr - цвет полосы
1 - красный
2 - зеленый
3 - синий
4 - Желтый
5 - Оранжевый
6 - Коричневый
7 - Белый
Иначе - черный
uses
GraphABC;
procedure LoadP (x0,y0,x,y,p,colr : integer);
const
s = 2;
var
st : integer;
begin
x0 := x0 - x0 mod s;
y0 := y0 - y0 mod s;
x := x - x mod s;
y := y - y mod s;
st := x0 + ((abs(x-x0)) div 100)*(p+10);
if st > x then
st := x;
LockDrawing;
case colr of
1 : SetPenColor (clRed);
2 : SetPenColor (clGreen);
3 : SetPenColor (clBlue);
4 : SetPenColor (clYellow);
5 : SetPenColor (clOrange);
6 : SetPenColor (clBrown);
7 : SetPenColor (clWhite);
else
SetPenColor (clBlack);
end;
Line (x0,y0,x,y0);
Line (x0,y,x,y);
Line (x0,y0,x0,y);
Line (x,y0,x,y);
Line (st,y0,st,y);
UnlockDrawing;
FloodFill (st-1,y0+1,PenColor);
SetPenColor (clBlack);
end;
|