tb0032.pp 760 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. { %GRAPH }
  2. { %TARGET=go32v2,win32,linux }
  3. { Old file: tbs0037.pp }
  4. { tests missing graph.setgraphmode OK RTL (FK) }
  5. uses
  6. graph,
  7. crt;
  8. var
  9. gd,gm,res : integer;
  10. begin
  11. gd:=detect;
  12. initgraph(gd,gm,'');
  13. res := graphresult;
  14. if res <> grOk then
  15. begin
  16. graphErrorMsg(res);
  17. halt(1);
  18. end;
  19. setviewport(0,0,getmaxx,getmaxy,clipon);
  20. line(1,1,100,100);
  21. {readkey;}
  22. setgraphmode(m1024x768);
  23. setviewport(0,0,getmaxx,getmaxy,clipon);
  24. res := graphresult;
  25. if res <> grOk then
  26. begin
  27. closegraph;
  28. graphErrorMsg(res);
  29. { no error, graph mode is simply not supported }
  30. halt(0);
  31. end;
  32. line(100,100,1024,800);
  33. {readkey;}
  34. delay(1000);
  35. closegraph;
  36. end.