Results 1 to 2 of 2

Thread: GdkWindow not a GdkDrawable?

  1. #1
    Join Date
    Sep 2006
    Location
    Central Europe
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    GdkWindow not a GdkDrawable?

    I'm trying to simply create a 22x22px GtkImage from a Cairo context. After reading through tons of out-dated information I gave up with:
    Code:
    GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 22, 22);
    GtkWidget *image = gtk_image_new_from_pixbuf (pixbuf);
    GdkDrawable *drawable = image->window;
    cairo_t *ctx = gdk_cairo_create (image->window);
    /* do some drawing */ 
    cairo_destroy (ctx);
    Now image->window doesn't seem to be a GdkDrawable as I get the warning:
    Code:
    Gdk-CRITICAL **: IA__gdk_cairo_create: assertion `GDK_IS_DRAWABLE (drawable)' failed
    Maybe all of this is crap - at the end I need a GtkImage and I have to use an existing paint-method that's using a Cairo context. Any help is appreciated.
    The Power User’s Guide to Unity
    Questions about Ubuntu? Ask them at askubuntu.com!

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: GdkWindow not a GdkDrawable?

    Closed by OP's request.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •