Demo

 
 

program Demo;

uses Types, QuickDraw, Events;


var

  i, col: Integer;


begin

  graphics(320);

  hideCursor;


  while true do begin

    clearScreen(black);


    for col := 1 to 15 do begin

      setSolidPenPat(col);


      for i := 0 to 31 do begin


        { Draw star }


        moveTo(random mod 320, random mod 200);

        line(0, 0);


        { Draw lines }


        moveTo(i * 10, 0);

        lineTo(0, 200 - i * 7);

        moveTo(320 - i * 10, 199);

        lineTo(319, i * 7);

      end;


      if button(0) then halt;

    end;

  end;

end.

Beautiful stars and line arts.


This program teaches simple QuickDraw commands.

GSoft BASIC Comparison 


  DO

    HGR

      FOR COL = 1 TO 15

        HCOLOR= COL


        FOR I = 0 TO 31


          ! Draw star


          HPLOT RND (1) * 320, RND (1) * 200


          ! Draw lines


          HPLOT I * 10, 0 TO 0, 200 - I * 7

          HPLOT 320 - I * 10, 199 TO 319, I * 7

        NEXT

      NEXT

    LOOP