[cairo] How to draw a picture inside another picture

Daniel Amelang daniel.amelang at gmail.com
Sat Apr 7 23:05:36 PDT 2007


On 4/5/07, Andrea Spadaccini <a.spadaccini at catania.linux.it> wrote:
> Hello everybody,
> I'm searching for a method to draw, using pygtk, a small picture (an icon)
> inside another big picture.
>
> I need to show them in a gtkdrawingarea, so I set the big picture as the source
> image of the gtkdrawingarea context, and I can draw over that picture. But I
> can't show ANOTHER little image OVER this picture.
>
> Please, help me: google isn't my friend! :(

I'm not a GTK guru, but since this has gone answered to 2 days, so here goes.

Have you already retrieved a cairo context for your widget? If not,
use gdk_cairo_create to do so. That's what you'll use to perform the
over operation with the small image, I would think.

Or are you saying that you just don't know how do perform an over
operation? cairo_set_source_surface and cairo_paint should be all you
need.

Dan


More information about the cairo mailing list