cairo pixmap draw_drawable problem
- From: "David L" <idht4n gmail com>
 
- To: gtkmm-list gnome org
 
- Subject: cairo pixmap draw_drawable problem
 
- Date: Mon, 19 Nov 2007 12:22:47 -0800
 
I'm trying to display a pixmap in a drawing area in gtkmm
and it's not working.  In gtk, I did something like this:
  pixmap_ = gdk_pixmap_new(darea_->window, width, height, -1);
  cr = gdk_cairo_create (pixmap_);
  // draw something here
  gdk_draw_drawable(darea_->window,
                    darea_->style->fg_gc[GTK_WIDGET_STATE (darea_)],
                    pixmap_,
                    0, 0, 0, 0, width, height);
In gtkmm, I'm doing something like this:
    pixmap_ = Gdk::Pixmap::create(window, width, height, -1);
    Cairo::RefPtr<Cairo::Context> cr = pixmap_->create_cairo_context();
    // draw something here
     pixmap_->draw_drawable(get_style()->get_fg_gc(Gtk::STATE_NORMAL), 
                                           window, 0, 0, 0, 0, width, height);
What am I doing wrong?
Thanks,
             David
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]