
Hello,
You could use Cairo. Load the image to a surface, then rotate the surface 10 degrees and paint it.
The first steps aren’t problematic, but how can I paint it - in which widget - so that the background is transparent, with drawingArea it doesn't seem to work. -- best regards H.

ahh, you want to paint against the desktop, then, yes? That requires
compositing, and I'm not sure there's a way to do that with Gtk
directly. Probably easier with X and OpenGL. Needs more of a Gnome
expert than me.
On Mon, Aug 24, 2009 at 6:34 PM, h
Hello,
You could use Cairo. Load the image to a surface, then rotate the surface 10 degrees and paint it.
The first steps aren’t problematic, but how can I paint it - in which widget - so that the background is transparent, with drawingArea it doesn't seem to work.
-- best regards H.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hello, I want to paint in some widget, but this will be in front of some background, so the bg should be transparent. At the moment it looks something like this (where it isn't the case): -- drawA <- drawingAreaNew widgetSetSizeRequest drawA 30 30 fixedPut fBox drawA (400,400) imgAt <- imageSurfaceCreateFromPNG "some.png" let drawC = do dw <- widgetGetDrawWindow drawA drawWindowClear dw renderWithDrawable dw $ do translate 9 9 rotate 0.3 translate (-9) (-9) setSourceSurface imgAt 0 0 paint onExpose drawA (const $ drawC>> return True) -- -- best regards H.
From: jefferson.r.heard@gmail.com Date: Mon, 24 Aug 2009 19:40:46 -0400 Subject: Re: [Haskell-cafe] Re: rotate image To: h._h._h._@hotmail.com CC: haskell-cafe@haskell.org
ahh, you want to paint against the desktop, then, yes? That requires compositing, and I'm not sure there's a way to do that with Gtk directly. Probably easier with X and OpenGL. Needs more of a Gnome expert than me.
Hol dir 30 kostenlose Emoticons für deinen Windows Live Messenger http://www.livemessenger-emoticons.com/funfamily/de-at/

Hello, Nobody any idea?
I want to paint in some widget, but this will be in front of some background, so the bg should be transparent.
-- best regards h. -- View this message in context: http://www.nabble.com/rotate-image-tp25122912p25198054.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Not really. Best thing I can think to do is use the X11 library to
pull the pixels under your window then draw them as a surface on the
drawingarea, then draw your rotated image on top of that. You have to
have a window, and Gtk windows do not have an alpha. You'll want it
to be undecorated, too...
On Fri, Aug 28, 2009 at 6:38 PM, h.
Hello,
Nobody any idea?
I want to paint in some widget, but this will be in front of some background, so the bg should be transparent.
-- best regards h. -- View this message in context: http://www.nabble.com/rotate-image-tp25122912p25198054.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hello, Thanks for your answers and your time, but I fear that I didn't described the problem accurately enough. The background is in the window created with gtk2hs (windowNew). It's just a fixed layout (fixedNew): bg <- imageNewFromFile "bg.jpg" fixedPut fBox bg (0,0) If I now create the new image (with imageNewFromFile "my.png") with it's alpha values, I can put it somewhere via fixedPut, and the other image is just covered where it should be, but I can't rotate the image. So cairo and the surface come into play. This works as well, the surface has it's alpha values where it should, but a drawingArea created with drawingAreaNew has a rectangular shape and a color. This is the problem. -- best regards h. -- View this message in context: http://www.nabble.com/rotate-image-tp25122912p25199462.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
participants (4)
-
h
-
h.
-
H. M.
-
Jeff Heard