<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV></DIV>
<DIV>Just as I thought. Thanks, Zheng Xu.<BR> </DIV>Regards.<BR><BR>Mj Mendoza IV,<BR>Developer, KonsolScript<BR><A href="http://www.konsolscript.org/" rel=nofollow target=_blank>http://www.konsolscript.org</A>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> xuzheng_yahoo <xz911jp@yahoo.co.jp><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Mj Mendoza IV <mjmendoza@konsolscript.org><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> cairo@cairographics.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, May 24, 2010 9:18:46 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [cairo] A surface to draw on another surface<BR></FONT><BR>Hi<BR><BR>How about the method like following?<BR><BR>cairo_surface_t *image_A, *image_B;<BR>cairo_t *image_dc_A, *image_dc_B;<BR><BR>image_A = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 200, 200);<BR>image_B = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 300, 300);<BR>image_dc_A = cairo_create(image_A);<BR>image_dc_B = cairo_create(image_B);<BR><BR>/* paint rectangle to surface A */<BR>cairo_set_source_rgba(image_dc_A, 1.0, 0.0, 0.0, 0.5);<BR>cairo_rectangle(image_dc_A, 0,
0, 200, 200);<BR>cairo_paint(image_dc_A);<BR><BR>cairo_set_source_rgba(image_dc_B, 0.0, 1.0, 0.0, 0.5);<BR>cairo_rectangle(image_dc_B, 0, 0, 300, 300);<BR>cairo_paint(image_dc_B);<BR><BR>/* paint surface A to surface B */<BR>cairo_set_source_surface(image_dc_B, image_A, 0, 0);<BR>cairo_paint(image_dc_B);<BR><BR>/* paint surface B to main draw context */<BR>cairo_set_source_surface(main_dc, image_B, 0, 0);<BR>cairo_paint(main_dc);<BR><BR>cairo_destroy(image_dc_A);<BR>cairo_surface_destroy(image_A);<BR>cairo_destroy(image_dc_B);<BR>cairo_surface_destroy(image_B);<BR><BR>Regards,<BR><BR>Zheng.Xu<BR><BR>Mj Mendoza IV ????????:<BR>> Is there a way to draw the contents of one cairo Surface (surface_A) to "another" cairo Surface (surface_B) before drawing surface_B to main cairo Context?<BR>> It doesn't seem possible. I wonder if there's a way around to doing this?<BR>> Regards.<BR>> <BR>> Mj Mendoza IV,<BR>> Developer, KonsolScript<BR>>
<A href="http://www.konsolscript.org/" target=_blank>http://www.konsolscript.org</A> <<A href="http://www.konsolscript.org/" target=_blank>http://www.konsolscript.org/</A>><BR>> <BR>> ------------------------------------------------------------------------<BR>> <BR>> --<BR>> cairo mailing list<BR>> <A href="mailto:cairo@cairographics.org" ymailto="mailto:cairo@cairographics.org">cairo@cairographics.org</A><BR>> <A href="http://lists.cairographics.org/mailman/listinfo/cairo" target=_blank>http://lists.cairographics.org/mailman/listinfo/cairo</A><BR><BR><BR>--------------------------------------<BR>2010 FIFA World Cup News [Yahoo!Sports/sportsnavi]<BR><A href="http://pr.mail.yahoo.co.jp/southafrica2010/" target=_blank>http://pr.mail.yahoo.co.jp/southafrica2010/</A><BR></DIV></DIV></div><br></body></html>