Recent

Author Topic: FreePascal graph  (Read 6217 times)

DDR31333

  • Newbie
  • Posts: 1
FreePascal graph
« on: March 28, 2018, 03:13:49 pm »
Hi

Does free pascal supports "graph". I remember that in turbo pascal and delphi pascal, was possibility to draw simple geometric shapes like, circle, rectangle, line.
When i use this code:

program test;
uses crt,graph;
begin
 circle(10,10,10);
readkey;
end.

i get error 216!!! :(

MichaelBM

  • New Member
  • *
  • Posts: 38
Re: FreePascal graph
« Reply #1 on: March 28, 2018, 03:21:03 pm »
Development Tool: Lazarus 2.0.6 + FPC 3.0.4
Database: Firebird 2.5.7
Operating System: Windows 10 Pro 64-bit

MichaelBM

  • New Member
  • *
  • Posts: 38
Re: FreePascal graph
« Reply #2 on: March 28, 2018, 03:23:17 pm »
http://wiki.freepascal.org/TAChart

Google is your friend...
Development Tool: Lazarus 2.0.6 + FPC 3.0.4
Database: Firebird 2.5.7
Operating System: Windows 10 Pro 64-bit

MichaelBM

  • New Member
  • *
  • Posts: 38
Re: FreePascal graph
« Reply #3 on: March 28, 2018, 03:24:27 pm »
Development Tool: Lazarus 2.0.6 + FPC 3.0.4
Database: Firebird 2.5.7
Operating System: Windows 10 Pro 64-bit

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: FreePascal graph
« Reply #4 on: March 28, 2018, 04:18:08 pm »
Code: Pascal  [Select][+][-]
  1. program project1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  7.   cthreads,
  8.   {$ENDIF}{$ENDIF}
  9.   Classes,crt,graph;
  10.  
  11. Var
  12.   Graphics, Mode : smallint;
  13.  
  14. begin
  15.  Graphics := Detect;
  16.  Mode := detectMode;
  17.  InitGraph(Graphics, Mode,'');
  18.  circle(10,10,10);
  19.  readkey;
  20. end.  

 

TinyPortal © 2005-2018