World: r3wp
[Postscript] Emitting Postscript from REBOL
older newer | first last |
Graham 6-Apr-2006 [114x2] | In the name of science, I repeated the above test and it printed out again. |
I also tried it with a pdf, as the printer supports direct pdf printing, but nothing happened. | |
Henrik 6-Apr-2006 [116] | interesting. tried different pdfs? |
Graham 6-Apr-2006 [117] | Not yet. |
Geomol 7-Apr-2006 [118x4] | DRAW -> PS is one possibility. Should we on a longer term also have a dialect or set of functions, than can produce PS? |
that | |
DRAW is also a function used like: img: make image! 100x100 DRAW img <some draw commands> With PostScript, I'm thinking something like: ps-output: "" POSTSCRIPT ps-output <some PS commands> ps-output could then also be a file! or port! and send the output directly to the destination. | |
<some PS commands> in the above is a block of commands with arguments. | |
Graham 7-Apr-2006 [122] | Is the aim to take a draw block and process it so that postscript is produced. |
Geomol 7-Apr-2006 [123x2] | That's what I understood from Henrik's posts. |
It's one way of doing it, and maybe not so bad. I don't know enough about PS to see, if DRAW is too limited. Maybe PS has a lot other stuff, you wanna do, that is difficult to do in DRAW. | |
Graham 7-Apr-2006 [125x2] | as far as I recall, it has quite a limited command set. |
of course, you can define new functions within ps. | |
Geomol 7-Apr-2006 [127x2] | The DRAW approach is, that if you can produce your output in a DRAW block, then you can also print it using PS. My approach is to make a PS dialect, and keep DRAW out of is. With my approach, you can print from REBOL/Core too. I guess, we can have both approaches without problem. |
And both will be usefull for different situations. | |
Graham 7-Apr-2006 [129] | but using a draw dialect is possible in core .. u just can't render it. |
Geomol 7-Apr-2006 [130] | Oh, you're right. :-) |
Graham 7-Apr-2006 [131x2] | but let's start with a postscript dialect and then see if we can retrofit draw to it. |
that way we are not constrained by draw. | |
Geomol 7-Apr-2006 [133] | Then I just need a list of PS commands to get started on the dialect. |
Graham 7-Apr-2006 [134x3] | since rebol3 is coming, and View may well change, it makes less sense to stick to the past. |
this has a reference at the end : http://www.cs.indiana.edu/docproject/programming/postscript/postscript.html | |
Is this works, you can then render your paint images to postscript printers :) | |
Geomol 7-Apr-2006 [137] | Is it the "Index of Operators" in the link, you gave? |
Graham 7-Apr-2006 [138] | yes. |
Geomol 7-Apr-2006 [139] | add, arc, ...translate |
Graham 7-Apr-2006 [140x6] | yes. |
pen red line 30x30 50x20 70x70 40x50 | |
newpath 1 0 0 setrgbcolor 30 30 moveto 50 20 lineto 70 70 lineto 40 50 lineto stroke | |
pen blue box 20x20 80x80 | |
newpath 0 0 1 setrgbcolor 20 20 moveto 60 0 rlineto 0 60 rlineto -60 0 rlineto closepath stroke | |
that's sort of equivalent in my understanding | |
Geomol 7-Apr-2006 [146] | PostScript dialect test ready. Try this: do http://home.tiscali.dk/postscript/postscript.r s: postscript [font ["Times-Roman" 20] ["Hello World!"]] s is now the PostScript output, that can be saved to a PS-file or sent to a printer. |
Rebolek 7-Apr-2006 [147] | I've got 404 :( |
Graham 7-Apr-2006 [148] | is that url correct? |
Geomol 7-Apr-2006 [149x3] | no :) 2 seconds |
do http://home.tiscali.dk/john.niclasen/postscript/postscript.r | |
Sorry about that. | |
Graham 7-Apr-2006 [152] | >> do http://home.tiscali.dk/john.niclasen/postscript/postscript.r connecting to: home.tiscali.dk ** User Error: Error. Target url: http://home.tiscali.dk/john.niclasen/postscript/postscript.r could not be retr ieved. Server respons... ** Near: do http://home.tiscali.dk/john.niclasen/postscript/postscript.r >> |
Geomol 7-Apr-2006 [153] | Local cache? |
Graham 7-Apr-2006 [154x2] | less haste less waste ! :) |
no,it's a 404 response. | |
Rebolek 7-Apr-2006 [156] | same here |
Geomol 7-Apr-2006 [157x4] | It worked for me just before, now it doesn't!?? Weird, I get same error now. |
I'll check with ftp ... | |
Strange, I can see the script on the server with ftp, but I can't reach it with browser or rebol. | |
Any ideas? | |
Graham 7-Apr-2006 [161] | must be a case problem. |
Cyphre 7-Apr-2006 [162] | works here ok, must be a connection problem |
Geomol 7-Apr-2006 [163] | yes, try now |
older newer | first last |