On Tue, 26 May 2009, Felipe Monteiro de Carvalho wrote:

Hello,

I and another worker have developed a vector graphics library for Free
Pascal and I am thinking about making it modifyed-LGPL and adding to
the lazarus-ccr repository, like fpspreadsheet. So I was wondering,
anyone interrested in it?

At the moment it supports only reading PDF and only writing GCode for
a CNC machine I am developing and also only lines and polylines (I
will be adding curves in the next months), but the main structure is
done and it is extensible for more formats and more geometrical
figures and it's properties.

Here is the kind of code that you can write with it:

     Vec := TvVectorialDocument.Create;
     try
       Vec.ReadFromFile(dialogoAbrir.FileName, vfPDF);
       Vec.WriteToStrings(memoCodigo.Lines, vfGCodeAvisoCNCPrototipoV5);
     finally
       Vec.Free;
     end;

Just 1 command to read a PDF, then the information is in the class and
just another command to save the output to a file, or a TStrings or a
TStream.

Formats are added by adding units to the uses clause, so only
necessary code is linked. Upon initialization they add themselves to a
list of formats in the fpvectorial unit.

Shouldn't it be part of FPC's canvas/image support ?

Or does it depend on the LCL ? I imagine only actual drawing routines
depend on the LCL, in which case it can be split in a GUI-independent
part (reading/writing files) and a GUI dependent part, such as drawing code.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to