[cairo] how to copy a rect area from one surface to another

abhidhnya sonawane abhidhnya.sonawane at gmail.com
Tue Dec 16 23:14:37 PST 2008


Hi,

I should have said that there is a mistake there.

But the code given there is right as I have implemented it.

1.Take a new cairo context and assoicate a new cairo surface with it.
2.Then do cairo_set_source_surface (cr, *SOURCE SURFACE*, dest_x - source_x,
dest_y - source_y) ,where cairo context is the is the one in step 1.

regards,
Abhidhnya.

On Wed, Dec 17, 2008 at 12:19 PM, abhidhnya sonawane <
abhidhnya.sonawane at gmail.com> wrote:

> Hi,
>
> They have given in it how to copy from source_x ,source_y to dest_x,dest_y.
> read again.
>
> Its given starting as :
>
> If you'd like to instead copy some (width, height) rectangle from (
> source_x, source_y) to some point (dest_x, dest_y) on the destination you
> would instead compute a new position for the source surface origin and then
> use cairo_fill instead of cairo_paint:
>
>
> regards,
> Abhidhnya .
>
>
> On Wed, Dec 17, 2008 at 12:14 PM, abhidhnya sonawane <
> abhidhnya.sonawane at gmail.com> wrote:
>
>> Hi,
>>
>> I have done some thing like this previously.
>>
>> Please see the link below, you will get the way to do it .
>>
>> http://www.cairographics.org/FAQ/
>>
>> Question 2a.
>>
>> regards,
>> Abhidhnya.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20081217/443a5aac/attachment.html 


More information about the cairo mailing list