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

World: r3wp

[Postscript] Emitting Postscript from REBOL

Geomol
6-Nov-2006
[1123x3]
Do this in a REBOL prompt to run the test:

do http://home.tiscali.dk/john.niclasen/postscript/postscript.r

write %test.ps postscript load http://home.tiscali.dk/john.niclasen/postscript/test.txt

Now the file %test.ps holds the postscript output.
The test output looks like this: http://home.tiscali.dk/john.niclasen/postscript/test.png

We would like tests on different PS-printers! Hopefully it should 
work everywhere!?
Also new font options are included. bold and italic is valid words 
inside the font block. And "Times" can be written as "Times" or "Times-Roman", 
upper- lower-case doesn't matter, the dialect should figure it out.
xavier
6-Nov-2006
[1126]
i just tried it ... and got no ps reader ... what should i use for 
reading it ? adobe acrobat ?
Geomol
6-Nov-2006
[1127]
xavier: ghostscript maybe!? Depends on your OS. If you have a PS-net-printer, 
it's also possible to send it to a port on the printer.
xavier
6-Nov-2006
[1128]
yes i just realised how stupid is my question .... i go to pick ghostscript 
and try it
Graham
6-Nov-2006
[1129]
Use gsview ...
Geomol
6-Nov-2006
[1130]
On net-printers, port 9100 will probably work. On parallel-port-printers, 
I guess the output should be sent ot lpt1:
!?
Graham
6-Nov-2006
[1131x3]
correct
ie. write %//prn for ltp1
and for usb postscript printers .. try this little trick http://synapsedirect.com/forums/thread/396.aspx
xavier
6-Nov-2006
[1134]
it worked ... i was searching a dialect for formatting outputs that 
have to be printed ... and just find it
Geomol
6-Nov-2006
[1135x3]
:-)
Documentation is coming up!
REBOL PostScript 0.3.0 dialect documentation: http://home.tiscali.dk/john.niclasen/postscript/postscript.html
Gregg
6-Nov-2006
[1138]
Very cool John! Now, if we can get a DisplayPostscript engine in 
R3....
Graham
6-Nov-2006
[1139]
Well, Carl did say he would fix View to assist with this ...
Pekr
7-Nov-2006
[1140x2]
Graham - what is the problem with View, so that Carl has to put-in 
some fix? Coordinate system? Unicode chars?
btw - do all (most) today's printers support postscript, even the 
small ones?
Graham
7-Nov-2006
[1142x2]
coordinate system, transformations and rotations are all different.
And no.
Pekr
7-Nov-2006
[1144]
isn't it fixable in View level, by recalculation?
Henrik
7-Nov-2006
[1145]
pekr, that's very hard, because the problem is also with font sizes. 
DRAW doesn't follow good conventions for sizes right now. VIEW is 
better, but it's all aliased graphics.
Pekr
7-Nov-2006
[1146]
guys, then try to involve Cyphre into discussions of what you gurus 
need new View kernel should do under the hood. I think that work 
on new View engine started ...
Henrik
7-Nov-2006
[1147]
I'm wondering what will happen to the relationship with DRAW and 
View. Right now it's quite disjointed.
Pekr
7-Nov-2006
[1148]
exactly - and those things should be voiced and discussed. Now is 
the time to have new face type, or more face types (animation, or 
more rich ones (text)) etc.
Henrik
7-Nov-2006
[1149]
also with two different font rendering engines... wouldn't View get 
smaller if freetype was used in View as well?
Rebolek
7-Nov-2006
[1150]
you can't use current View for that task - you don't know font's 
baseline, so it's not possible to position different sizes of fonts 
on same line.
Cyphre
7-Nov-2006
[1151]
Yes, you are right, there are two different font engines which is 
not much efficient. Moreover the DRAW text rendering was meant to 
be just for really simple labeling(the main text engine in R2 is 
still the original FACE text rendering) and it would need some improvements 
for more complex usage. All this should be unified and improved in 
R3. There will be only one text engine with rich-text dialect.
Graham
7-Nov-2006
[1152]
Cyphre .. how feasible would a PS renderer be in R3?
Pekr
7-Nov-2006
[1153]
Graham - isn't PS rendering "just" a question of particular dialect, 
translating into View faces rendering? (sorry, I am not fluent with 
PS, so dunno what would be needed, just asking)
Graham
7-Nov-2006
[1154]
the AGG translation etc works differently from PS.
Pekr
7-Nov-2006
[1155]
hmm, my opinion was based upon SVG dialect, which we were able to 
render, using translation into AGG ...
Cyphre
7-Nov-2006
[1156x2]
Regarding the coordinate system: I''ll ty to thing how to incorporate 
both, the PS like and SVG like orientation. But do we really need 
this at low-level? IIRC I have posted some example how to change 
the coordinates using simple reparsing the coord values?
Graham, I still don't know where is the problem to write any transformation 
function in Rebol to create any kind of coordinate system even in 
R2. Maybe I'm missing something?
Rebolek
7-Nov-2006
[1158]
I think one low-level coordination system is enough IF that system 
supports decimal pair!
Cyphre
7-Nov-2006
[1159]
Yep, decimal pair!s would be hopefully added in R3 ;)
Rebolek
7-Nov-2006
[1160]
great:) something, at least :)
Pekr
7-Nov-2006
[1161x2]
what about parameter for face, specifying where your 0x0 is? I do 
remember, when Carl was at Viscorp, and they were working on ABL\E 
with Jim Goodnow, Carl stated, that new AmigaOS should be able to 
have windows with different resolution on one screen :-)
I also do remember that View carried some 'span argument, but it 
was never of much usage ...
Rebolek
7-Nov-2006
[1163]
I remember some beta View documents about virtual coordinate space 
:)
Graham
7-Nov-2006
[1164]
Cyphre, it's not just the coordinate system, it's rotation, scaling 
and transformations.
Cyphre
7-Nov-2006
[1165]
what is different in PS tranformations vs DRAW?
Graham
7-Nov-2006
[1166x4]
I did a demo somewhere which showed the problem.
can't recall the specifics though.
the other thing that PS has is a way to save the graphic state .. 
do stuff... and then restore the state
rotate - in PS is anticlockwise, in Rebol is clockwise
Henrik
7-Nov-2006
[1170]
I would suggest that if DRAW is kept, that it would be possible to 
switch transformation and rotation modes to make it adaptable to 
more graphics systems.
Pekr
7-Nov-2006
[1171x2]
maybe it is time for gurus to speak in some closed group and redesign 
face aproach? Do you remember Carl wanting to introduce kind of min-face?
imo draw, as introduced to View, is a hack .... it lives in effect 
pipeline, is that correct?