Jump to content

Scripting with Postscript

Recommended Posts

If you already installed Ghostscript to use it with the PostscriptImport.FileType plugin then you may also have a look to the PostscriptRenderer.Effect plugin.


As always copy the newest OptionBasedLibrary into the Pint.NET folder and the effect plugin in the Effects folder.


PostscriptRenderer.Effect v0.2.zip


Here a screenshot of the interface:




And of some built-in examples:




The x/y axes start bottom/left.

The default Postscript unit is point (72 points are 1 inch). In the future the plugin will allow to preset pixel, cm, or inch.

Remember postscript language is RPN (like Forth). So first type the operands and then the operation code.







Edited by midora

midoras signature.gif

Link to comment
Share on other sites

It seems to work flawlessly.  I was prompted to install GS - which I did, then it ran like a dream.


Completely baffled by the command syntax :(

Link to comment
Share on other sites

Completely baffled by the command syntax :(


Don't be frustrated. It would be a big surprize if someone could just write code in a programming language which uses reverse polish notation (Maybe users of the old HP calculators).


In the moment I'm just happy that it is working for others because it is a little bit tricky to get an effect running in the multi-threaded Paint.NET environment which posts back information to the dialog in the UI thread. And still it works w/o UI, means CTRL-F is possible.


Because I know that postscript is not a solution for 99.9% of the users one of the next steps will be to wrap postscript with something which is easier to use. Like Turtle graphics in the Logo programmimg language. (Maybe I should not mention Logo because it's a Lisp dialect ;-).


So the first tab of the dialog could be "Turtle Graphics"...

midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...