[cairo] Problem with show_surface in 0.4.0

Ricardo Markiewicz gazer.arg at gmail.com
Wed May 18 08:18:07 PDT 2005


Hi All ... after upgrade to cairo 0.4.0 I receive this message when I
call cairo_show_surface from my programs:
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 31350 error_code 8 request_code 72 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I know that in CVS show_surface was deprecated and replaced with
set_source_surface, but in 0.4 are any significant change to the API?

The portion of code of mi program is :
 while (it) {
    item = it->data;

    cairo_save (cr);
      g_object_get (G_OBJECT (item), "x", &x, "y", &y,
        "width", &w, "height", &h,
        "surface", &surface, NULL);
        cairo_translate (cr, x, y);
        cairo_show_surface (cr, surface, w, h);  (**)
    cairo_restore (cr);
    it = it->next;
  }

The program crash at (**) allways.  Commenting that line the progran
just run fine (but not draw is output, obviously)

I'm using Cairo 0.4.0 from Ubuntu Breezy, and X11 backend with Gtk 2.6

thx!
-- 
--
Ricardo Markiewicz



More information about the cairo mailing list