Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-06

Vector graphics on Lazarus.

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Geoff Bagley

I guess that there are two fundamental types of graphics.

1) A bitmap like in BP7.
2) Vector graphics like in Postscript.

Does a Unit for Postscript, or similar (HPGL?) output exist in Lazarus?

Best regards to all.

Geoff

Reply by email

Felipe Monteiro de Carvalho
to Geoff Bagley
Geoff Bagley wrote
Does a Unit for Postscript, or similar (HPGL?) output exist in Lazarus?

I am writing fpvectorial, a vectorial graphics library for Free Pascal, and planning to add it to Free Pascal subversion in some point in the future.

At the moment it only has 2 inputs: PDF and my GCode and 2 output: my GCode and drawing to a TFPCustomCanvas or descendent, which is all I need for my purposes.

All the basic structure is ready, if you want to write a module for PostScript output I can send the code to you.

Felipe Monteiro de Carvalho

Reply by email

Geoff Bagley
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 11 lines
I am writing fpvectorial, a vectorial graphics library for Free Pascal, and planning to add it to Free Pascal subversion in some point in the future. At the moment it only has 2 inputs: PDF and my GCode and 2 output: my GCode and drawing to a TFPCustomCanvas or descendent, which is all I need for my purposes. All the basic structure is ready, if you want to write a module for PostScript output I can send the code to you.

Hello Felipe.

I am a newcomer to Lazarus.
All my Pascal work in the past has been in ordinary Pascal like Borland BP7, GNU gpc, and now Free Pascal.

I do not yet have the skill to write a module for Postscript, but I am very interested.

Best regards,

Geoff.

Reply by email

Felipe Monteiro de Carvalho
to Geoff Bagley

My original plan was to read PostScript, but soon we found that it's a full programming language and you can't just parse it, you need to interpretate it, so we gave up and went to PDF instead.

Having said that, I think that writing PostScript should be easier then reading, because you don't need to use all feature, just the minimum necessary, while when reading you need to test with the output of multiple softwares which will use all different parts of the specification (I tested PDF reading against CorelDraw and Inkscape).

No, I don't know any other way to achieve what you want except for the following options:

* Rethink your application. Do you really need PostScript output?
* Write yourself a import module for PostScript for fpvectorial
* Pay someone to do it (you can try here
http://wiki.lazarus.freepascal.org/Bounties or in rent-a-coder)
* Write manually code to write PostScript without using fpvectorial. I think it will have a worse result then writing an import module for fpvectorial.
* Find a C library which does this and translate the headers.

I am willing to write the import module for a fair price. If you are interrested, please contact me in private.

Felipe Monteiro de Carvalho

Reply by email

Mattias Gaertner
to Geoff Bagley: Hello Felipe. I am a newcomer to Lazarus. All my Pascal work in the past has been in…
Show quoted text 21 lines
Felipe Monteiro de Carvalho wrote: > > I am writing fpvectorial, a vectorial graphics library for Free > Pascal, and planning to add it to Free Pascal subversion in some > point in the future. > > At the moment it only has 2 inputs: PDF and my GCode and 2 output: > my GCode and drawing to a TFPCustomCanvas or descendent, which is > all I need for my purposes. > > All the basic structure is ready, if you want to write a module for > PostScript output I can send the code to you. Hello Felipe. I am a newcomer to Lazarus. All my Pascal work in the past has been in ordinary Pascal like Borland BP7, GNU gpc, and now Free Pascal. I do not yet have the skill to write a module for Postscript, but I am very interested.

Note:
There is a TPostScriptCanvas in the LCL postscriptcanvas unit. You can use that to create postscript files.

Mattias

Reply by email