[cairo] cairomm & gtkmm for windows

Jonathon Jongsma jonathon.jongsma at gmail.com
Sun Mar 12 12:12:56 PST 2006

On 3/12/06, Frank Spies <morpheus at squirrely.net> wrote:
>  hi all,
>  i've downloaded the gtkmm dev installer for ms windows from here:
>  http://www.pcpm.ucl.ac.be/~gustin/win32_ports/
>  and installed the 2.8.3 version
>  it also downloaded and installed the gtk dev package
>  it all works fairly well (after some tweaking) until i try to use cairomm
>  i had to download that separately from the cairomm site but now it can not
> find:
>  Gdk::Window::create_cairo_context()

cairomm is not integrated with gtkmm until the 2.9.x series even
though GTK+ uses cairo as of 2.8.x.  Until the new gtkmm series is
released, you'll have to get a cairo context by using the underlying
GTK+/GDK functions.  For example, you'll need to do something like
this (assuming you have cairomm installed):

Glib::RefPtr<Gdk::Window> win = get_window();
Cairo::RefPtr<Cairo::Context> cr(
    new Cairo::Context(gdk_cairo_create(win->gobj()), true));

>From here on, you can use cr just as if you had called the missing
gtkmm function Gdk::Window::create_cairo_context().  In other words,
this is the only place you'll need to resort to a workaround until
gtkmm 2.10 comes out.


More information about the cairo mailing list