On 4/30/07, Paul Davis <[EMAIL PROTECTED]> wrote:
> John,
>
> Thanks for the code.  I managed to get a C++ version working.
>
> Although, as I was worried, its slower than molasses.  The basic flow
> is more or less like this:
>
> Copy pixbuf to pixmap
> render text on top of pixmap
> Create temporary pixbuf from pixmap
> copy from pixbuf back to original pixbuf.
>
> If anyone has any ideas on how to make this faster, I'd much appreciate it.
>
> Thanks,
> Paul Davis

just an idea...  Could you use the Gdk::Pixbuf::get_pixels(),
get_rowstride(), get_width(), get_height() functions and use this raw
data to create a cairo surface using this data with
Cairo::Surface::create (unsigned char *data, Format format, int width,
int height, int stride) (or if you're using plain cairo, then you'd
use cairo_image_surface_create_for_data())?  Then you could just draw
on it as you would any other cairo surface...  Would that work?  would
It be faster?  I don't know.

-- 
jonner
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to