%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.cloud/img.varak.cloud/img/foto-old/KOKOS04/Další/Dokumenty/oko farba a klamy/
Upload File :
Create Path :
Current File : /www/varak.cloud/img.varak.cloud/img/foto-old/KOKOS04/Další/Dokumenty/oko farba a klamy/SEDA.PAS

program seda;
uses Graph;

var
 grDriver: Integer;
 grMode: Integer;
 ErrCode: Integer;
 i:integer;
 vyber,y0,y1,valueY:integer;
 nasobok:real;
begin
nasobok:=1;
y0:=800;
y1:=200;

 grDriver := Detect;
 InitGraph(grDriver, grMode,' ');
 ErrCode := GraphResult;
 if ErrCode = grOk then
 begin  { Do graphics }
repeat
      writeln('1: RGB -- horizontal');
      writeln('2: RGB -- vertical');
      writeln('3: RGB -- vertical and horizontal');
      writeln('4: CMY(K) -- horizontal');
      writeln('5: CMY(K) -- vertical and horizontal');
      writeln('6: vertical: CMY(K) and RGB');
      writeln('7: RGB vejar farieb');
      writeln('8: RGB vejar farieb 2');
      writeln('9: RGB sikme ciary...');
      writeln('0: Koniec');
      readln(vyber);
case vyber of
     2: begin cleardevice;
        for i:=1 to GetMaxY do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(0,i,GetMaxX,i);
        end;Readln;end;
     3: begin cleardevice;
        for i:=1 to trunc(GetMaxX/2) do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(i,0,i,GetMaxY);
        end;
        for i:=1 to GetMaxY do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(trunc(GetMaxX/2),i,GetmaxX,i);
        end;Readln;end;
     4: begin cleardevice;
        for i:=1 to GetMaxX do begin
            if (i mod 3)=0 then setcolor(cyan);
            if (i mod 3)=1 then setcolor(magenta);
            if (i mod 3)=2 then setcolor(yellow);
            line(i,0,i,GetMaxY);
        end;Readln;end;
     5: begin cleardevice;
        for i:=1 to trunc(GetMaxX/2) do begin
            if (i mod 3)=0 then setcolor(cyan);
            if (i mod 3)=1 then setcolor(magenta);
            if (i mod 3)=2 then setcolor(yellow);
            line(i,0,i,GetMaxY);
        end;
        for i:=1 to GetMaxY do begin
            if (i mod 3)=0 then setcolor(cyan);
            if (i mod 3)=1 then setcolor(magenta);
            if (i mod 3)=2 then setcolor(yellow);
            line(trunc(GetMaxX/2),i,GetmaxX,i);
        end;Readln;end;
     6: begin cleardevice;
        for i:=1 to trunc(GetMaxX/2) do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(i,0,i,GetMaxY);
        end;
        for i:=trunc(GetmaxX/2) to GetMaxX do begin
            if (i mod 3)=0 then setcolor(cyan);
            if (i mod 3)=1 then setcolor(magenta);
            if (i mod 3)=2 then setcolor(yellow);
            line(i,0,i,GetmaxY);
        end;Readln;end;
     7: begin cleardevice;
        for i:=1 to GetMaxX do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(i,trunc(nasobok*i),0,GetMaxY);
        end;Readln;end;
     8: begin cleardevice;
        for i:=1 to GetMaxX do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            valueY:=trunc(i*nasobok)+y0;
            line(i,0,0,valueY);
        end;
        for i:=400 to GetMaxX do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(i,0,i,GetMaxY);
        end;Readln;end;
     9: begin cleardevice;
        for i:=1 to GetMaxX do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(i,0,i-y1,GetMaxY);
        end;
        for i:=400 to GetMaxX do begin
            if (i mod 3)=0 then setcolor(red);
            if (i mod 3)=1 then setcolor(green);
            if (i mod 3)=2 then setcolor(blue);
            line(i,0,i,GetMaxY);
        end;Readln;end;
     0: continue;
      else begin writeln('Value out of bound.');readln;end;
end;
until vyber=0;
   CloseGraph;
 end
 else
   Writeln('Graphics error:', GraphErrorMsg(ErrCode));
end.


Zerion Mini Shell 1.0