RSS    
  procedure MyText(X, Y: Integer; S: string);

procedure Title;

var

  TempImage: TImage;

                                implementation

{---------Object TImage----------}

procedure TImage.Destroy;

begin

  if Image <> nil then

    begin

      FreeMem(Image, Size);

      Image := nil;

      Size := 0;

    end

end; {Timage.Destroy}

{-------------------}

procedure TImage.Get(X1, Y1, X2, Y2: Integer);

begin

  Destroy;

  Size := ImageSize(X1, Y1, X2, Y2);

  GetMem(Image, Size);

  GetImage(X1, Y1, X2, Y2, Image^);

end; {TImage.Get}

{-------------------}

procedure TImage.Put(X, Y: Integer);

begin

  if Image <> nil then

    PutImage(X, Y, Image^, 0);

end; {TImage.Put}

{---------Object TImage----------}

procedure MyInitGraph;

var

    GD, GM : Integer;

begin

 GD := Detect;

 InitGraph(GD, GM,'');

 if GraphResult <> grOK then

  Halt(1);

end; {MyInitGraph}

{-------------------}

procedure MyText(X, Y: Integer; S: string);

var

  I: Word;

  C: Char;

begin

 MoveTo(X, Y);

 I := 0;

 repeat

  Inc(I);

  OutText(S[I]);

  Delay(Time_4);

 until (I = Length(S));

end; {NyText}

{-------------------}

procedure _Pause;

begin

 ReadKey;

end; {_Pause}

КР. 991096.00.00.00 ПЗ Лист
——–

Изм.

Лист

№ докум.

Подп.

Дата

19
 


{-------------------}

procedure Animation(X, Y: Integer; D: Integer;

                    XY: Byte; S: string; Vis: Boolean);

                       {Animation}

var

  DX, DY: Integer;

  I: Integer;

begin

 DX := 1;

 DY := 1;

 SetColor(Green);

 if D < 0 then

   begin

     DX := -1;

     DY := -1;

   end;

 case XY of

   1: DY := 0;

   2: DX := 0;

 end;

 D := Abs(D);

 for I := 1 to D do

  begin

   TempImage.Get(I * DX + X,

            I * DY + Y,

            TextWidth(S) + I * DX + X,

            TextHeight(S) + I * DY + Y);

   OutTextXY(X + I * DX, Y + TextHeight(S) + I * DY, S);

   Delay(Time_3);

   if I <> D then

    TempImage.Put(X + I * DX, Y + I * DY);

   if (I = D) and not VIs then

    TEMPImage.Put(X + I * DX, Y + I * DY);

  end;

end; {Animation}

{-------------------}

procedure Arrow(X, Y, L: Integer; Direction: Byte);

type

 COOrAR = array [1..6] of Integer;

var

  X1: Integer;

  Y1: Byte;

  Y2: Byte;

  XX: COOrAR;

  YY: COOrAR;

procedure Change1;

begin

 X1 := -X1;

 L  := -L

end;

procedure Change2;

var

  I: Byte;

  Temp: Integer;

begin

 for I := 1 to 6 do

  begin

   TEMP  := XX[I];

   XX[I] := YY[I];

   YY[I] := TEMP;

  end;

КР. 991096.00.00.00 ПЗ Лист
——–

Изм.

Лист

№ докум.

Подп.

Дата

20
 


end;

procedure ArrowCCOOr;

begin

 XX[1] := X1; YY[1] :=  Y2;

 XX[2] := X1; YY[2] :=  Y1;

 XX[3] :=  L; YY[3] :=  Y1;

 XX[4] :=  L; YY[4] := -Y1;

 XX[5] := X1; YY[5] := -Y1;

 XX[6] := X1; YY[6] := -Y2;

end;

var

   I: Byte;

begin

 X1 := CArrow.X1;

 Y1 := CArrow.Y1;

 Y2 := CArrow.Y2;

 if L < X1 then L := X1;

 case Direction of

  2, 4: Change1;

 end;

 ArrowCCOOr;

 case Direction of

  3, 4: Change2;

 end;

 MoveTo(X, Y);

 for I := 1 to 6 do

  LineTo(X+XX[I], Y+YY[I]);

 LineTo(X, Y);

end; {Arrow}

{-------------------}

procedure Title;

const

  Word_1: string = 'Курсовая работа по информатике.';

  Word_2: string = 'Тема: взаимодействие основных частей ЭВМ при выполнении программы';

  Word_3: string = 'Выполнили студенты группы МРС-91:';

  Word_4: string = 'Егоров   О.В.';

  Word_5: string = 'Шетманюк М.В.';

begin

 ClearDevice;

 SetColor(LightGreen);

 Rectangle(0, 0, GetMaxX, GetMaxY);

 SetFillStyle(1, Blue);

 FloodFill(1,1, LightGreen);

 SetColor(LightGray);

 Rectangle(25, 25,GetMaxX-25, GetMaxY-25);

 SetFillStyle(1, DarkGray);

 FloodFill(101,101, LightGray);

 SetTextJustify(1, 0);

 SetTextStyle(0,0,2);

 SetColor(Black);

 OutTextXY(GetMaxX div 2+1, GetMaxY div 2-1, Word_1);

 SetColor(Brown);

 OutTextXY(GetMaxX div 2, GetMaxY div 2, Word_1);

 SetTextStyle(0,0,0);

 SetColor(Red);

 OutTextXY(GetMaxX div 2, GetMaxY-35, 'Хабаровск 2000');

 SetColor(Black);

 OutTextXY(GetMaxX div 2+1, GetMaxY div 2-1+18, Word_2);

 SetColor(Brown);

 OutTextXY(GetMaxX div 2, GetMaxY div 2+18, Word_2);

 SetTextJustify(0, 0);

КР. 991096.00.00.00 ПЗ Лист
——–

Изм.

Лист

№ докум.

Подп.

Дата

21
 


SetColor(Black);

 OutTextXY(GetMaxX-Length(Word_3)*8+1-180, GetMaxY-100-1, Word_3);

 SetColor(White);

 OutTextXY(GetMaxX-Length(Word_3)*8-180, GetMaxY-100, Word_3);

 SetColor(Black);

 OutTextXY(GetMaxX+1-180, GetMaxY-90-1, Word_4);

 SetColor(LightGreen);

 OutTextXY(GetMaxX-180, GetMaxY-90, Word_4);

 SetColor(Black);

 OutTextXY(GetMaxX+1-180, GetMaxY-80-1, Word_5);

 SetColor(LightGreen);

 OutTextXY(GetMaxX-180, GetMaxY-80, Word_5);

 _Pause;

 ClearDevice;

end; {Title}

{-------------------}

procedure BLink(X, Y: Integer; S: string);

var I: Byte;

begin

  for I := 1 to 3 do

    begin

      SetColor(Black);

      Delay(Time_1);

      OutTextXY(X, Y + TextHeight(S), S);

      SetColor(Green);

      Delay(Time_1);

      OutTextXY(X, Y + TextHeight(S), S)

    end

end; {Blink}

{-------------------}

end.

КР. 991096.00.00.00 ПЗ Лист
——–

Изм.

Лист

№ докум.

Подп.

Дата

22
 


Страницы: 1, 2, 3, 4, 5, 6, 7


Новости


Быстрый поиск

Группа вКонтакте: новости

Пока нет

Новости в Twitter и Facebook

                   

Новости

Обратная связь

Поиск
Обратная связь
Реклама и размещение статей на сайте
© 2010.