[fpc-pascal]Easy graphics<

Alan Mead cubrewer at yahoo.com
Fri Apr 23 01:46:04 CEST 2004


Michael Van Canneyt <michael.vancanneyt at wisa.be> wrote:

> Yes. You need at least 1.9.2.
> The best would even be to download the latest CVS, as it supports
> more formats.
> Or you can try to download the FCL sources and recompile them with
> FPC 1.0.10.

I appreciate your help with this.  I installed 1.9.2 on my other
machine and I see most of the units (the writejpg is not found)...
you indicated that your code was only a rough sketch but I cannot get
it to compile:

[amead at ugly amead]$ cat j.pas
program j;
uses fpimage,fpcanvas,fpwritepng;
Var
  Image : TMemoryImage;
  Canvas : TFPimageCanvas;
begin
  Image := TMemoryImage.Create(640,480);
  Image.PaletteBased:=False;
  Canvas:=TFPImageCanvas.Create(Image);
  Canvas.Pen.Color:=colRed;
  Canvas.Circle(100,100,50);
  Canvas.Rectangle(50,50,150,150);
  Canvas.Free;
  Image.SaveToFile('myfile.png');
  Image.Free;
end.
[amead at ugly amead]$ fpc j.pas
Free Pascal Compiler version 1.9.2 [2004/01/07] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compiling j.pas
j.pas(7,11) Error: Identifier not found "TMemoryImage"
j.pas(7,23) Error: Error in type definition
j.pas(8,12) Error: Identifier not found "TFPimageCanvas"
j.pas(8,26) Error: Error in type definition
j.pas(11,12) Error: Identifier not found "TMemoryImage"
j.pas(11,31) Fatal: Syntax error, ";" expected but "(" found

-Alan


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash




More information about the fpc-pascal mailing list