[gtkmm] problem using stipple in Gdk::GC



I'm trying to use a stipple pattern in a GC and it's giving me X Window System Error. Here's a code snippet:

Glib::RefPtr<Gdk::Pixmap> m_stipple =
Gdk::Pixmap::create_from_xpm (get_window(), m_trans_color, "stipple.xpm");
myGC->set_stipple(m_stipple);
m_refPixmap->draw_rectangle ( myGC,
                              true,
                              0, 0,
                              10, 10);

If I comment out the set_stipple line, I get no error. If I try to use the stipple, I get:
The program 'iqcdb2.1' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 15641 error_code 8 request_code 56 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.)

Is this a known problem with using stipple with gtkmm? Is there any way I can get more
information to help debug the problem?

Thanks,
Eric



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]