r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Postscript] Emitting Postscript from REBOL

Geomol
2-Jun-2009
[1932]
Because all content in the dialect starts with a word or a string, 
I could make the size optional. It will just mean a more complicated 
dialect, but it won't break your code.
Henrik
2-Jun-2009
[1933x2]
Geomol, did you try my VID->postscript conversion function? It might 
be able to do some of what you need.
it does not do word wrapping however. that's a problem that I've 
not yet solved.
Maxim
2-Jun-2009
[1935]
there is VID manual word-wrapping code in glayout lib if you need 
it.
Henrik
2-Jun-2009
[1936]
interesting. how does it work?
Geomol
2-Jun-2009
[1937]
hm, I remember something about that. I think, I tried it a while 
ago.

But what about the suggestion for a change to the dialect?
Henrik
2-Jun-2009
[1938x3]
http://rebol.hmkdesign.dk/files/vid-postscript2.png
if you drop the position marker, will it be simpler or harder to 
build formatted tables?
oops, size marker, not position marker
Geomol
2-Jun-2009
[1941x3]
It should make no difference. Dropping the size just mean, you need 
to add the size to the possition yourself. The thing is, in my examples 
here, I often know the final right border (pos + size), so I always 
have size set to zero. And then it struck me, that I don't need the 
size.
at 0x0 "some long text that will be right aligned" right 800

is the same as

at 800x0 "some long text that will be right aligned" right
I like the second way better.
Maxim
2-Jun-2009
[1944]
glayout wordwrap functions uses the internal view commands which 
calculate word-wrap.
Henrik
2-Jun-2009
[1945]
Maxim, so they will be identical to what is seen in View instead 
of DRAW?
Maxim
2-Jun-2009
[1946x3]
I was using it specifically to build HUGE tables (300000cells) and 
its deadly fast.
yes.
you can use it to wordwrap draw text too.
Henrik
2-Jun-2009
[1949x2]
this will be useful when I will get to finish the function, perhaps 
in a month or so.
Geomol, I guess it doesn't harm layout capabilities.
Geomol
2-Jun-2009
[1951]
Do you use the RIGHT and CENTER options in the dialect in your code 
today? Would you have to change alot, if I drop the size in the dialect?
Maxim
2-Jun-2009
[1952]
the function is called get-word-wrap in the glayout lib (on rebol.org)
Henrik
2-Jun-2009
[1953x2]
Geomol, there are some subtle bugs that I've not been able to figure 
out, causing certain layouts not to print, so I stick to a specific 
version right now.
It's a little annoying having only a 1-2 week window a year to work 
with postscript.
Maxim
2-Jun-2009
[1955:last]
get-word-wrap can even return the pair size next to the lines, if 
you need the info to properly place the text   :-)