From: Magicloud M. <mag...@gm...> - 2009-08-18 02:09:50
|
Er... how to treat drawable as pixbuf, castToPixbuf? It failed when running.... On Mon, Aug 17, 2009 at 6:10 PM, Axel Simon<Axe...@en...> wrote: > > On Aug 17, 2009, at 11:41, Magicloud Magiclouds wrote: > >> Hi, >> The situation is like this. I have a drawable widget, I draw >> something on it using cairo. And I have another pixmap, I draw some >> lines on it. >> Now I want to cover the picture in the pixmap on the widget. By >> cover, I meant only draw the lines to the widget, not totally cover. >> How to do that? I cannot figure out a proper way in gtk2hs. > > You can treat a drawable as a pixbuf and as a cairo surface at the same time > using the functions > > http://www.haskell.org/gtk2hs/docs/gtk2hs-docs-0.10.0/Graphics-UI-Gtk-Cairo.html#v%3AcairoImageSurfaceFromPixbuf > > I've added these functions due to a similar request. I was never able to > test them, so it would be good if you could give us some feedback if they > work as expected. > > Axel. > >> 竹密岂妨流水过 >> 山高哪阻野云飞 >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gtk2hs-users mailing list >> Gtk...@li... >> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users > > -- 竹密岂妨流水过 山高哪阻野云飞 |