some confusion about cairo_surface_t

"530125717" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
��



unsigned char* image_buffer_main;


image_buffer_main = (unsigned char*)malloc(100* 100 * 4); 



cairo_surface_t * cairo_surface_main;




cairo_surface_main = cairo_image_surface_create_for_data(


image_buffer_main,


CAIRO_FORMAT_ARGB32,


100,



100,


100 
* 4);


cairo_t * cairo_image_main;

cairo_image_main = cairo_create 
(cairo_surface_main);





unsigned char* image_buffer_sub;


image_buffer_sub= (unsigned char*)malloc(20* 20* 4);


cairo_surface_t * cairo_surface_sub;




cairo_surface_sub= cairo_image_surface_create_for_data(


image_buffer_sub,


CAIRO_FORMAT_ARGB32,


20,


20,


20* 4);


cairo_t * cairo_image_sub;

cairo_image_sub= cairo_create 
(cairo_surface_sub);




As above codes show, I'd like to buffer something in 
"cairo_surface_sub",


and then use "cairo_surface_sub" as the source of "cairo_image_main".


I don't know how to connect them, who can help me now?

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.