
Hi guys again just want to ask you I have this function ready -- Creates a Postscript file from an Image -- page shows -200 <= x <= 200, 300 <= y <= 300 -- boundaries, plus origin plotted on output image2PS:: Image -> String -> IO() image2PS (Image contents) filename = writeFile filename (header++contents++footer) where header = unlines ["%!PS-Adobe-3.1" ,"%%BoundingBox: 100 125 500 725" ,"%%PageOrder: Ascend" ,"%%Pages: 1" ,"%%BeginDocument" ,"%%Page: 1 1" ,"100 125 moveto 500 125 lineto 500 725 lineto 100 725 lineto closepath gsave stroke grestore clip" ,"275 425 moveto 50 0 rlineto stroke" ,"300 400 moveto 0 50 rlineto stroke" ] footer = unlines ["showpage" ,"%%EndDocument" ] but when I use it for example image2PS spiral iliali it tells me that the iliali is undefined. What do you thing how should I use it. Thanks in advance! PS: I need to know how this works so that I make a similar function that converts logo2PS since I have a Logo spiral and I want to see it in PostScript. Thanks again! -- View this message in context: http://www.nabble.com/Converting-image2PS-function-tp16122095p16122095.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Am Dienstag, 18. März 2008 16:00 schrieb iliali16:
Hi guys again just want to ask you I have this function ready
but when I use it for example
image2PS spiral iliali
it tells me that the iliali is undefined. What do you thing how should I use it. Thanks in advance!
image2PS spiral "iliali" should work. String literals are enclosed in double quotes.
PS: I need to know how this works so that I make a similar function that converts logo2PS since I have a Logo spiral and I want to see it in PostScript. Thanks again!

Thanks very much Daniel Fischer-4 wrote:
Am Dienstag, 18. März 2008 16:00 schrieb iliali16:
Hi guys again just want to ask you I have this function ready
but when I use it for example
image2PS spiral iliali
it tells me that the iliali is undefined. What do you thing how should I use it. Thanks in advance!
image2PS spiral "iliali"
should work. String literals are enclosed in double quotes.
PS: I need to know how this works so that I make a similar function that converts logo2PS since I have a Logo spiral and I want to see it in PostScript. Thanks again!
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- View this message in context: http://www.nabble.com/Converting-image2PS-function-tp16122095p16124595.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

iliali16 wrote:
I have this function ready
image2PS:: Image -> String -> IO()
but when I use it for example
image2PS spiral iliali
it tells me that the iliali is undefined.
iliali is a variable, which has to be bound so it can be used, e.g. iliali = "iliali" main = image2PS spiral iliali alternatively, you can use a literal string (enclosed in double quotes) directly: main = image2PS spiral "iliali" Tillmann
participants (3)
-
Daniel Fischer
-
iliali16
-
Tillmann Rendel