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

World: r3wp

[Postscript] Emitting Postscript from REBOL

Geomol
7-Apr-2006
[151]
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
Rebolek
7-Apr-2006
[164]
now it works
Geomol
7-Apr-2006
[165]
Now it works. It seems, it take a little time, before tiscali makes 
content reachable.
Graham
7-Apr-2006
[166]
Ok, looks okay.  But each element needs to be placed on the page.
Geomol
7-Apr-2006
[167]
?
Graham
7-Apr-2006
[168x3]
you need to tell the postscript engine where to place the text.
eg. 72 72 moveto
which is one inch from the left bottom edge
Geomol
7-Apr-2006
[171]
It's a start.
What happen, if you leave out that part?
Graham
7-Apr-2006
[172x3]
nothing happens I suspect.
there's also a postscript preamble or header.
%!PS-Adobe-3.0
%%Creator: Synapse-EMR 3.01
%%LanguageLevel: 2
Geomol
7-Apr-2006
[175x3]
Oh, misunderstood.
Try:
s: postscript [font ["Times-Roman" 20] [at 72x72 "Hello World!"]]
You can position with AT pair!
Now the dialect has to be defined precisely with all the functionality, 
we want.
Graham
7-Apr-2006
[178x2]
gsave
 .75 setgray
 /Helvetica-Bold findfont 72 scalefont setfont
 72 100 moveto
 (Hello World!)	 show
 grestore
I would save the state and then restore it.
Geomol
7-Apr-2006
[180]
I need to learn more about PostScript.
Graham
7-Apr-2006
[181x2]
Do you have to specify the pen colour or not ?
this ..  .75 setgray uses a gray colour for the text.
Geomol
7-Apr-2006
[183]
The dialect can't cope with that yet.
Graham
7-Apr-2006
[184]
This is a good start though.
Geomol
7-Apr-2006
[185]
So far, you can specify font, set position and print text.
Graham
7-Apr-2006
[186x2]
so, you need also the %! at the beginning, and a showpage at the 
end.
things like 'box can be defined as a function in postscript.
Geomol
7-Apr-2006
[188]
Desitions have to be made about the dialect structure. Should the 
outer block consist of font-specifications and pages, or isn't that 
structure the best for PS? A better understanding of PS is needed 
to answer.
Graham
7-Apr-2006
[189x2]
so, you would probably need some predefined functions that are also 
emitted.
Is the main aim to do text, or translate draw images?
Geomol
7-Apr-2006
[191]
I would aim for an implementation of PS functionality as a REBOL 
dialect. Nothing to do with draw yet.
Graham
7-Apr-2006
[192x3]
we have Gabriele's pdf dialect to use a model.
his dialect must cover the same problems .. as pdf is a subset of 
postscript.
at 72x72 font Helvetica-Bold 6.0 "Hello World!"
Geomol
7-Apr-2006
[195]
I'll look at all the PS operators to get a view of the whole thing. 
Then define a structure for the dialect (probably top-concept of 
a page), and then implement the operators most needed.
Graham
7-Apr-2006
[196]
this looks easier to write.
Geomol
7-Apr-2006
[197]
Would it be normal in PS to define the font before anything else, 
and then describe pages with paths? Is that the structure?
Graham
7-Apr-2006
[198x2]
I wonder if we can't just use Gabriele's dialect and build a different 
emitter.
I'm not sure .. I've only read about postscript in the last day.
Geomol
7-Apr-2006
[200]
It'll take time for me to read others dialect rules. It'll probably 
be faster for me to make the dialect, so I know, what's going on 
everywhere.