Difference between revisions of "fpvectorial"
From Lazarus wiki
Jump to navigationJump to searchSekelsenmat (talk | contribs) (→Usage) |
Sekelsenmat (talk | contribs) |
||
Line 45: | Line 45: | ||
end; | end; | ||
</delphi> | </delphi> | ||
+ | |||
+ | ==More examples== | ||
+ | |||
+ | Please see in the FPC repository: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fpvectorial/examples/ | ||
Go to back [[Package_List|Packages List]] | Go to back [[Package_List|Packages List]] |
Revision as of 16:59, 13 August 2010
Introduction
FPVectorial offers support to read, modify and write vectorial images.
It's counterpart library is fp-image, which works with raster images. FPVectorial comes with a unit which allows to draw a vectorial image to a TFPCustomCanvas, but no routines are provided to convert raster images to vectorial images.
Current file list
FPVectorial is located in Free Pascal 2.3.1+ in the directory fpc/packages/fpvectorial/src
The central unit is fpvectorial.
Readers and writers for various image formats
- pdfvectorialreader - Read support for PDF files, supports compression, only reads the first page
- avisocncgcodereader - Read support for the G-Code from the Aviso CNC machine
- avisocncgcodewriter - Write support for the G-Code from the Aviso CNC machine
Other units
- fpvtocanvas - Converts a vectorial document to a TFPCustomCanvas descendent (like TCanvas). Essentially converts the vectorial image to a raster image
- pdfvrlexico, pdfvrsemantico, pdfvrsintatico, avisozlib - Other units from the PDF reader, don't use directly
Usage
- Loads a PDF, converts it to G-Code and writes the G-Code to a TStrings descendent
<delphi> uses
fpvectorial, pdfvectorialreader, avisocncgcodewriter;
var
Vec: TvVectorialDocument;
begin
if dialogoAbrir.Execute() then begin Vec := TvVectorialDocument.Create; try Vec.ReadFromFile(dialogoAbrir.FileName, vfPDF); Vec.WriteToStrings(synCodigo.Lines, vfGCodeAvisoCNCPrototipoV5); finally Vec.Free; end; end;
end; </delphi>
More examples
Please see in the FPC repository: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fpvectorial/examples/
Go to back Packages List