Re: Drawing with cairo

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

 



On Thu, 2008-05-15 at 12:05 -0300, Diego A. Fons wrote:

> Like Theodore I'm using gtkmm. This is an extrac of the code which 
> doesn't work:
> void Plotter::on_realize( void )
> {
>     // Create the GDK window
>     refGdkWindow = Gdk::Window::create(get_window(), &attributes,
>             GDK_WA_X | GDK_WA_Y);
> 
>     // Create Cairo context
>     Cairo::RefPtr<Cairo::Context> cr = refGdkWindow->create_cairo_context();
> }

you're all thinking too hard. Cairo drawing contexts are supposed to be
created as necessary. They are cheap. Don't try to cache them. Create
them in an expose handler and get rid of them.

my attitude towards Cairo is to assume that its been handcoded in SSE9
assembler unless i come across particular hotspots.


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux