<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi, Swati<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Assume you already have two image surfaces, img_surface&nbsp; is image surface of 200x200 and dst_surface is of size 400x400.&nbsp; You want to paint img_surface to dst_surface,
 you can do this<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">/* prepare cairo for drawing img_surface to dst_surface */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">cairo_t *cr = cairo_create (dst_surface);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">/* set img surface to paint from (100, 100) to (300, 300) */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">cairo_set_source_surface (cr, img_surface, 100, 100);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">/* paint it */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">cairo_paint (cr);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">/* dump dst_surface to png file for exam */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">cairo_surface_write_to_png (dst_surface, &#8220;png file&#8221;);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">/* cleanup */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">cairo_destroy (cr);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hope this helps<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Henry<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> swati upadhyaya [mailto:swatiupadhyaya@gmail.com]
<br>
<b>Sent:</b> Wednesday, January 04, 2012 5:56 AM<br>
<b>To:</b> Andrea Canciani<br>
<b>Cc:</b> Henry (Yu) Song - SISA; cairo@cairographics.org<br>
<b>Subject:</b> Re: [cairo] patch [1/1] invert image in _cairo_gl_surrface_map_to_image<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Hi Henry and Andrea,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">First of all thanks for reply&nbsp;<img width="14" height="14" id="_x0000_i1025" src="cid:image001.png@01CCCAC3.C209D700"><o:p></o:p></p>
<div>
<p class="MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I didn't get what you people mentioned as I am new to cairo lib
<img width="14" height="14" id="_x0000_i1026" src="cid:image002.png@01CCCAC3.C209D700">. Let me explain my problem&nbsp;briefly, Suppose I have a device with screen width and height as 400 x 400. And I have an image with 200 x 200. Now in my device for this image
 start of x=100 and end of x = 300. Now I have to draw the line from 100 to 300..I am using the API<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">surface = cairo_image_surface_create_for _data(unsigned char *buff,CAIRO_FORMAT_ARGB32,width,height,cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32,width))<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">where width is image width = 200<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">height is image height = 200.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Then I am doing&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">cr = cairo_create(surface);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Now the problem is as the surface starts from top left only so it will go from 0 to 200 but I want to draw form 100 to 300. So<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">1) what can I do to shift the origin of the surface fom 0 to 100 ? So that it will draw on the same..<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;I am using elementary API(like evas,efl). And on mouse move callback I am drawing the line...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2) I have tried giving whole the width and height as my devise that is width = height = 400. But in this case while saving the image some scaling factor occur and line drawn become thin and position is also shifted. This is because we are
 capturing 400 x 400 to 200 x 200 image.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">First time I am using cairo lib thats why not&nbsp;familiar of everything.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">for the image with the width and height same as screen its working fine..as for that surface as well as image both starts from 0.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Please let me know how to solve this problem(how to shift the origin of the surface so that I can draw exactly from where I want to draw)...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Wed, Jan 4, 2012 at 2:13 PM, Andrea Canciani &lt;<a href="mailto:ranma42@gmail.com">ranma42@gmail.com</a>&gt; wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On Wed, Jan 4, 2012 at 1:56 AM, Henry (Yu) Song - SISA<br>
&lt;<a href="mailto:hsong@sisa.samsung.com">hsong@sisa.samsung.com</a>&gt; wrote:<br>
&gt; Date: &nbsp; Fri Dec 30 11:24:54 2011 -0800<br>
&gt;<br>
&gt; &nbsp; &nbsp;gl: Add support to invert non texture gl surface image that does not have<br>
&gt; &nbsp; &nbsp;GL_MESA_pack_invert when map from gl surface to image surface<br>
&gt;<br>
&gt; diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c<br>
&gt; index 8f69033..8b8f196 100644<br>
&gt;<br>
&gt; --- a/src/cairo-gl-surface.c<br>
&gt; &#43;&#43;&#43; b/src/cairo-gl-surface.c<br>
&gt; @@ -1001,6 &#43;1001,10 @@ _cairo_gl_surface_map_to_image (void &nbsp; &nbsp; &nbsp;*abstract_surface,<br>
&gt; &nbsp; &nbsp; unsigned int cpp;<br>
&gt; &nbsp; &nbsp; cairo_bool_t invert;<br>
&gt; &nbsp; &nbsp; cairo_status_t status;<br>
&gt; &#43; &nbsp; &nbsp;cairo_t *inv_cr = NULL;<br>
&gt; &#43; &nbsp; &nbsp;cairo_image_surface_t *inv_image = NULL;<br>
&gt; &#43; &nbsp; &nbsp;cairo_pattern_t *inv_pattern = NULL;<br>
&gt; &#43; &nbsp; &nbsp;cairo_matrix_t inv_matrix;<br>
&gt;<br>
&gt; &nbsp; &nbsp; /* Want to use a switch statement here but the compiler gets whiny. */<br>
&gt; &nbsp; &nbsp; if (surface-&gt;base.content == CAIRO_CONTENT_COLOR_ALPHA) {<br>
&gt; @@ -1093,6 &#43;1097,50 @@ _cairo_gl_surface_map_to_image (void &nbsp; &nbsp; &nbsp;*abstract_surface,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;image = (cairo_image_surface_t *)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_cairo_surface_create_in_error (status);<br>
&gt; &nbsp; &nbsp; }<br>
&gt; &#43;<br>
&gt; &#43; &nbsp; &nbsp;/*<br>
&gt; &#43; &nbsp; &nbsp; * FIXME: we must invert the image if it is non texture surface,<br>
&gt; &#43; &nbsp; &nbsp; * and it does not have GL_MESA_pack_invert.<br>
&gt; &#43; &nbsp; &nbsp; * Is there more efficient way to invert image?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">Using negative stride might be more efficient, but some backends might<br>
not (yet) support them correctly.<br>
<br>
Side note:<br>
It is already possible to create negative stride images.<br>
Should we add a test trying to use them and support them?<br>
Unless I get feedback, I'll try to write the test this weekend.<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
&gt; &#43; &nbsp; &nbsp; */<br>
&gt; &#43;<br>
&gt; &#43; &nbsp; &nbsp;if (! _cairo_gl_surface_is_texture (surface) &amp;&amp; ! invert) {<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp;inv_image = (cairo_image_surface_t*)<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; _cairo_image_surface_create_with_pixman_format (NULL,<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pixman_format,<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extents-&gt;width,<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extents-&gt;height,<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -1);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; if (unlikely (inv_image-&gt;base.status)) {<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto CLEAR_IMAGE;<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; }<br>
&gt; &#43;<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; image-&gt;base.is_clear = FALSE;<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; inv_pattern = cairo_pattern_create_for_surface (&amp;image-&gt;base);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; if (unlikely (inv_pattern-&gt;status)) {<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto CLEAR_PATTERN;<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; }<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_matrix_init_scale (&amp;inv_matrix, 1.0, -1.0);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_matrix_translate (&amp;inv_matrix, 0, -(extents-&gt;height));<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_pattern_set_matrix (inv_pattern, &amp;inv_matrix);<br>
&gt; &#43;<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; inv_cr = cairo_create (&amp;inv_image-&gt;base);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; if (unlikely (inv_cr-&gt;status)) {<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto CLEAR_CAIRO;<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; }<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_set_source (inv_cr, inv_pattern);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_set_operator (inv_cr, CAIRO_OPERATOR_SOURCE);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_paint (inv_cr);<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">You're using the same surface as source and as destination.<br>
This results in undefined behavior.<br>
If you want to flip the image like this, you should use two independent surfaces<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; cairo_surface_destroy (&amp;image-&gt;base);<br>
&gt; &#43; &nbsp; &nbsp; &nbsp; image = (cairo_image_surface_t *)cairo_surface_reference (&amp;inv_image-&gt;base);<br>
&gt; &#43; &nbsp; &nbsp;}<br>
&gt; &#43;<br>
&gt; &#43;CLEAR_CAIRO:<br>
&gt; &#43; &nbsp; &nbsp;cairo_destroy (inv_cr);<br>
&gt; &#43;CLEAR_PATTERN:<br>
&gt; &#43; &nbsp; &nbsp;cairo_pattern_destroy (inv_pattern);<br>
&gt; &#43;CLEAR_IMAGE:<br>
&gt; &#43; &nbsp; &nbsp;cairo_surface_destroy (&amp;inv_image-&gt;base);<br>
&gt;<br>
&gt; &nbsp; &nbsp; return &amp;image-&gt;base;<br>
&gt; &nbsp;}<br>
&gt; --<br>
&gt; cairo mailing list<br>
&gt; <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
&gt; <a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">
http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
--<br>
cairo mailing list<br>
<a href="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><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>