Re: [gtkmm] problem using stipple in Gdk::GC



Tassos,

Thanks for the advice on using a Bitmap and using the
render_threshold_alpha; it worked.

If GC::set_stipple can only accept a Bitmap, should the code in GC.cc be
updated to only accept a Bitmap, instead of a more general Pixmap?

Thanks again,
Eric

On Tue, 2002-11-12 at 07:58, Tassos Bassoukos wrote:
> On Mon, 2002-11-11 at 23:02, Eric Newman wrote:
> > 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);
> > 
> [snip]
> > The error was 'BadMatch (invalid parameter attributes)'.
> [snip]
> 
> > Thanks,
> > Eric
> 
> You will need a Bitmap, not a Pixmap. I would suggest creating a
> Gdk::PixBuf and using the render_threshold_alpha menthod to fill the
> Bitmap.
> 
> HTH,
> Tassos
-- 
Eric Newman <enewman ati com>
ATI Research, Inc.



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