From: Georg M. <mai...@st...> - 2005-02-08 19:41:17
|
On Tue, 08 Feb 2005 20:10:08 +0100, Daan Leijen <da...@cs...> wrote: >>> However, the printing support refers only at the moment to just norma= l >>> printing. I have not studied Postscript devices yet... Isn't it >>> always possible to just select a postscript printer and print to file= ? >>> Or do you have something special in mind? >> >> >> perhaps I'm misunderstanding something here. It's been a while since >> I looked into this, but when I wanted a way to convert the graphs I >> draw on wxWidgets to print in scalable form, the way to go seemed to >> be to create a Postscript context and pass that to the normal repaint >> function, so that it would draw in Postscript commands instead of on >> the screen. Seemed almost too easy, only that I couldn't find a way to >> create such things in wxHaskell. > > I added support for drawing onto printer device contexts. This means > that you have printer support -- a user gets a printer dialog etc. and > can print, while the haskell code just draws to a DC -- either the > screen or a printer. On windows, I can simply select a postscript > printer and print to a file to get postscript output. > > However, I have not added specific support for getting postscript > output directly, even though I can vagelue remember that wxWidgets > has such support -- if I find time, I'll look into it, but I am > hoping that also on unix, one can emulate this behaviour by selecting > a postscript printer and printing to file. On unix it is even more natural to print to a file in postscript format. = However, the question is how the content is represented for printing. I'a= m not sure whether the content of the DC in wx is sent to the printer as = a bitmap or as vector graphics. The latter would be certainly prefered fo= r ps-files. Georg |