World: r3wp
[Postscript] Emitting Postscript from REBOL
older newer | first last |
Henrik 14-Oct-2008 [1794x3] | Ghostscript will not run that file here. |
ah wait... let me check if your version of to-postscript properly supports images | |
it was wrong. please try again. | |
Geomol 14-Oct-2008 [1797] | Doesn't work with my version of postscript. Why is the image change needed? |
Henrik 14-Oct-2008 [1798x2] | because otherwise I can't put images directly into the dialect and I will have to store them in a tempory place first and reference them with a word => much more code. |
the changes I listed above adds image! support directly.. | |
Geomol 14-Oct-2008 [1800x2] | Ah, got it. *thinking* |
With the change, I can produce a PS file, but I still can't see the image. Will try some stuff... | |
Henrik 14-Oct-2008 [1802] | There should not be any change in my version of the image decoder. |
Geomol 14-Oct-2008 [1803] | Does this work for you? write %imagetest.ps postscript [DeviceRGB [translate 100x600 scale 100x100 image help.gif]] |
Anton 14-Oct-2008 [1804] | Yes, I had to add DeviceRGB to see the image. |
Henrik 14-Oct-2008 [1805x2] | yes, it works |
DeviceRGB is already added here. Is scale necessary? | |
Geomol 14-Oct-2008 [1807x2] | Think so. :) |
Yes, so your image is there, it's just tiny. | |
Henrik 14-Oct-2008 [1809] | well, it still won't run the PS file. |
Geomol 14-Oct-2008 [1810] | Use scale 72x72 for 72 dpi. |
Henrik 14-Oct-2008 [1811] | back in 30 mins. |
Geomol 14-Oct-2008 [1812x2] | Henrik, I think, you need another factor. The one you have now, is set to 1. It's ok for your text. You have to put scale 72x72 (or something) when showing images. |
I tried setting your factor to 72, then I can see the image, but the text is HUGE! :-) | |
Henrik 14-Oct-2008 [1814x3] | BTW, if you don't mind: I've added a probe on the dialect code output in to-postscript.r. Then you can see if I'm writing something incorrect out. |
interesting that you can run the file. I can't. | |
and I've already added scaling | |
Geomol 14-Oct-2008 [1817x5] | I had a problem some time ago showing PS files, I produced. I think, it was some cache. |
The dialect code, you produce, looks ok. I'm really not a shark with PS, so it doesn't mean, it's 100%, even if it looks ok to me. :) | |
Best way is to test, test, test, I'm afraid. | |
I can't get image! datatype to work in the postscript dialect (your suggestion). If I have it as a word, that is being "get", it works. | |
It's because, an image! datatype is the sequence make image! [ .... and that is being parsed. | |
Henrik 14-Oct-2008 [1822x4] | I don't get The 'img variable is set to an image! type, just like it is when using load-image from a file or url (which I couldn't get to work either). |
Sorry, should be: I don't get it. The 'img variable is set to an image! type, just like it is when using load-image from a file! or url! (which I couldn't get to work either). | |
I'm very confused right now. Images now work, but are placed in the wrong corner, despite being given the same coordinates as text and boxes. | |
solved the positioning problem | |
Graham 4-Dec-2008 [1826x2] | Henrik, did you create a dialect that takes a VID layout and produces a printout in PS? |
Yes... I know it's 1am for you! | |
Henrik 4-Dec-2008 [1828] | yes, I did |
Graham 4-Dec-2008 [1829] | How well does it work? |
Henrik 4-Dec-2008 [1830] | actually not a dialect, it just converts a View object tree to postscript. it's used in the same way as to-image is on a layout. |
Graham 4-Dec-2008 [1831x2] | Kewl |
Have you published it? | |
Henrik 4-Dec-2008 [1833x2] | http://rebol.hmkdesign.dk/files/vid-postscript2.png |
http://rebol.hmkdesign.dk/files/to-postscript.r | |
Graham 4-Dec-2008 [1835] | close .... |
Henrik 4-Dec-2008 [1836] | if you're doing B/W stuff and not worrying too much about text wrapping, then it should work. |
Graham 4-Dec-2008 [1837] | since it works on a view object ... it should work on Rebgui as well |
Henrik 4-Dec-2008 [1838] | no bitmap support and no wrapped text support. |
Graham 4-Dec-2008 [1839] | why not? |
Henrik 4-Dec-2008 [1840] | (which is why it says wednesday twice in one of the fields in the postscript output. |
Graham 4-Dec-2008 [1841] | the ps dialect supports rebol image format |
Henrik 4-Dec-2008 [1842] | because that is handled at the View level. text wrapping information is not available in the layout tree. |
Graham 4-Dec-2008 [1843] | Hope Vid+ doesn't have that limitation |
older newer | first last |