World: r3wp
[Postscript] Emitting Postscript from REBOL
older newer | first last |
Graham 13-Apr-2006 [465] | because you might only want to create a short postscript fragment rather than a script. |
Geomol 13-Apr-2006 [466x3] | yes |
We need information about, what can be inside one path, and how they are used in other PS files. | |
In my lates PS output, there is also a problem, where the box and the filled box is made. The box ends with a closepath and a stroke, but there is no newpath to start the next. I think, that's not 100% correct, but it seems to work. | |
Graham 13-Apr-2006 [469x3] | I didn't even use 'newpath ! :( |
Ok, definitely need to find out when a newpath command is needed. | |
presumably, stroke, fill, and show close the existing path. | |
Geomol 13-Apr-2006 [472] | I read somewhere, that some PS operators force newpath, but it's bad practice to leave them out. |
Graham 13-Apr-2006 [473] | maybe just make 'newpath a part of the dialect as well. |
Geomol 13-Apr-2006 [474x5] | That is a problem, because we then leave it up to the user to make sure, the rules of PS holds. That's the same as writing PS directly, so not much is won. |
A good dialect is one with some simple rules, and where it's difficult to produce something wrong. | |
We just need to know a little more, then we can make it almost perfect. | |
:) | |
I'm too tired now and am going to bed. Good night! | |
Henrik 13-Apr-2006 [479] | night |
Graham 13-Apr-2006 [480] | but it makes it easier to program :) |
Henrik 13-Apr-2006 [481] | is it me or does translate not work? |
Graham 13-Apr-2006 [482] | I never got as far as implementing translate. But John's has it. |
Henrik 13-Apr-2006 [483] | it's john's version I'm trying it in |
Graham 13-Apr-2006 [484x5] | mine works .. I'll upload it. |
test3: form ps/header [ gsave translate 72x72 at 0x0 box 72x72 stroke grestore showpage ] | |
draws a box at 72x72 where origin is translated to 72x72 | |
test3: form ps/header [ gsave translate 72x72 newpath at 0x0 box 72x72 stroke grestore showpage ] | |
{%! %%Creator: ps.r ver 0.0.4 gsave 72 72 translate newpath 0 0 moveto 72 0 rlineto 0 72 rlineto -72 0 rlineto closepath stroke grestore showpage %%EOF | |
Henrik 13-Apr-2006 [489] | ah, the good old copy trap. for the zillionth time I fell in. |
Graham 13-Apr-2006 [490] | wait for R3 then! |
Henrik 13-Apr-2006 [491] | this has to be working by april 22nd. so that's no go. |
Graham 13-Apr-2006 [492] | watcha doing? |
Henrik 13-Apr-2006 [493] | that barcode thing. |
Graham 13-Apr-2006 [494x3] | ahh... |
just numbers? | |
or full alphabet? | |
Henrik 13-Apr-2006 [497x2] | yes |
no | |
Graham 13-Apr-2006 [499] | you can't use a postscript barcode font? |
Henrik 13-Apr-2006 [500] | no, the barcode is already working fine. it's the position of the image on the paper and general arrangement of the code that needs to be worked out |
Graham 13-Apr-2006 [501] | oh well, good luck. |
Henrik 13-Apr-2006 [502] | thanks |
Graham 13-Apr-2006 [503] | oh, how are you doing the image in postscript ? |
Henrik 13-Apr-2006 [504] | just drawing lots of parallel lines |
Graham 13-Apr-2006 [505] | ok, there's a hex format for images as well as using eps, but I don't know how that works. |
Henrik 13-Apr-2006 [506x2] | interesting |
like image! ? | |
Graham 13-Apr-2006 [508] | guess so. |
Henrik 13-Apr-2006 [509x2] | ok I can rotate, but not translate |
ah! I was using a pair! instead of two numbers | |
Graham 13-Apr-2006 [511x2] | Thinking of what John said, I suspect if you try and automate the newpath etc, you'll get into problems. |
You'll be trying to write a better postscript than postscript .. .which may be possible! | |
Henrik 13-Apr-2006 [513x2] | I haven't been thinking of that yet.... but the ultimate goal should be to use postscript on a higher level |
postscript [page [at 20x20 barcode 12345]] | |
older newer | first last |