Re: gdk_draw_rgb[_32]_image alternative?
- From: Tadej BorovÅak <tadeboro gmail com>
- To: "fkater googlemail com" <fkater googlemail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gdk_draw_rgb[_32]_image alternative?
- Date: Tue, 11 Aug 2009 10:15:00 +0200
Hello.
I am looking for an alternative to the gdk_draw_rgb[_32]_image()
functions for copying data into a drawable.
Why don't you use cairo to do the drawing? The procedure would be as simple as:
---- CODE ----
cairo_t *cr;
cairo_surface_t *surface;
cr = gdk_cairo_create( drawable );
surface = cairo_image_surface_create_from_data(
data, CAIRO_FORMAT_ARGB32, w, h, s );
cairo_set_source_surface( cr, surface, 0, 0 );
cairo_paint( cr );
cairo_destroy( cr );
cairo_surface_destroy( surface );
---- CODE ----
Tadej
--
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]