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
[318x2]
When setcm is used, max coords is 20 or so to be within page.
21x24
Henrik
7-Apr-2006
[320]
no it stops parsing when the word 'setcm is reached
[unknown: 9]
7-Apr-2006
[321]
I have not been watching this very close, so to get me up to speed....you 
are writing an emitter from Rebol to PS?
Geomol
7-Apr-2006
[322]
Reichart, yes.
Henrik
7-Apr-2006
[323x2]
reichart: http://www.hmkdesign.dk/ps.png
(OSX converts it to PDF)
[unknown: 9]
7-Apr-2006
[325]
Cool.
Henrik
7-Apr-2006
[326]
it's also really small
Geomol
7-Apr-2006
[327]
just a basic one with text and some graphics.
[unknown: 9]
7-Apr-2006
[328]
how about pulling a "NeXT" and making a PS VID? : )
Geomol
7-Apr-2006
[329]
hehe
[unknown: 9]
7-Apr-2006
[330]
Gabriele is writing a PDF emitter for MakeDoc and QML.
Henrik
7-Apr-2006
[331]
reichart, shush! Steve Jobs might be reading this.
[unknown: 9]
7-Apr-2006
[332]
: )
Geomol
7-Apr-2006
[333]
150 lines of code so far. Can be seen here: http://home.tiscali.dk/john.niclasen/postscript/postscript.r
Henrik
7-Apr-2006
[334]
I think Sun also made a PS window manager
[unknown: 9]
7-Apr-2006
[335x2]
Yeah, I was reading the code as I posted.
Very cool.
Henrik
7-Apr-2006
[337]
it's primarily to make more methods for graphical printing with rebol
[unknown: 9]
7-Apr-2006
[338]
Postscript is copyrighted?
Henrik
7-Apr-2006
[339]
I hope not?
Geomol
7-Apr-2006
[340x2]
oops, don't spoil the fun! ;-)
Reichart, maybe you can find out? You know where to look.
Henrik
7-Apr-2006
[342x2]
http://www.pugo.org/pyps/<--- don't tell this guy that
if it was, why would Adobe put the entire specs online?
Geomol
7-Apr-2006
[344]
Adobe gives permission to anyone to:
Write drivers to generate output 
consisting of PostScript language commands.
It's from the ref manual.
[unknown: 9]
7-Apr-2006
[345]
John, cool. Henrik.....putting thier spec online would not have led 
me to beleive it was free of copyright.  But I wanted to confirm.
Geomol
7-Apr-2006
[346]
We need to include an appropriate copyright notice.
[unknown: 9]
7-Apr-2006
[347]
I have a cool idea for PS with our Qwikis then.
Geomol
7-Apr-2006
[348]
It's in section 1.4 in the ref manual.
Henrik
7-Apr-2006
[349]
geomol, and BSD license
Geomol
7-Apr-2006
[350x5]
I managed to switch y-axis, try:
do http://home.tiscali.dk/john.niclasen/postscript/postscript.r

write %test.ps postscript [page [switchy setcm linewidth 0.1 path 
[setgray 0.8 line 1x1 5x5]]]
If setcm is used, then switchy has to come first.
It seems like, it isn't aligned right though.
Needs to be moved up.
Well, that's it for today. Good night!
Henrik
7-Apr-2006
[355x3]
night
http://www.hmkdesign.dk/ps2.jpg
that's it for me too... night
Louis
8-Apr-2006
[358]
Henrik, are you going to develope your ean13.r any further so that 
everything is there and saves to a file?   


http://www.isbn-international.org/en/download/implementation-guidelines-04.pdf
Geomol
8-Apr-2006
[359]
Hey, cool PostScript pic, Henrik! :-)
Graham
8-Apr-2006
[360x5]
mapping colours from rebol to postscript.
0 0 0 => black 0.0.0
1 1 1 => white 255.255.255
view-ps-color: func [ color [tuple!]][ return reduce [ color/1 / 
255 color/2 / 255 color/3 / 255 ]]
don't know how a ps engine will cope with this

>> view-ps-color orange
== [1 0.588235294117647 3.92156862745098E-2]
seems to have no problems with this format.
Geomol
8-Apr-2006
[365x3]
Thanks!
New version! PostScript is default set to DeviceGray with no colours. 
To set it to DeviceRGB, I made a command in the dialect for that. 
Try:
do http://home.tiscali.dk/john.niclasen/postscript/postscript.r

write %test.ps postscript [DeviceRGB page [switchy linewidth 5 path 
[setcolor 255.0.0 line 50x50 50x100 setcolor 0.255.0 line 50x100 
100x100 setcolor 0.0.255 line 100x100 100x50 setcolor 255.0.255 line 
100x50 50x50]]]
Another example:

write %test.ps postscript [page [font [Times-Roman 40] linewidth 
0 path [at 72x720 "REBOL PostScript Dialect"] path [line 72x716 520x716] 
font [Times-Roman 16] path [at 96x680 "With this dialect it's possible 
to easily produce PostScript output."] font [Helvetica-Oblique 12] 
[at 72x72 "PostScript is copyright Adobe."]]]