<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 style="font-family: times new roman,new york,times,serif; font-size: 12pt;">First of all thanks for replying<br><br>>Only through creating a bigger surface and transferring the data with<br>>'cairo_set_source_surface() ; cairo_paint()'.<br>What i am concerned here is what are the APIs for getting the data and then setting it as a source.I tried with these APIs but i dont know whether this is correct or not.<br><br> cairo_pattern_t* cairoPattern = cairo_pattern_create_for_surface(mData->mSurface);<br> cairo_set_source(ctx, cairoPattern);<br> cairo_paint();<span style="font-family: monospace;"><br><br></span>Note: ctx is attached to another cairo surface.. To which i want to draw the original contents<br>Is this correct or
not?<br><br><br>>And just to clarify, cairo's scaling works in the same fashion. It<br>>scales the source (which may be an image or something else) and<br>>paints it to the target. It never changes the source image.<br>Thats true. But here what i want to paint the image in the target without scaling it. That is with the original size.<br><br>thanks<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Kalle Vahlman <kalle.vahlman@gmail.com><br>To: anurag swarnkar <anu_swar10@yahoo.co.in><br>Cc: cairo@cairographics.org<br>Sent: Tuesday, 29 January, 2008 2:13:07 PM<br>Subject: Re: [cairo] How to resize the cairo surface ?<br><br>2008/1/29, anurag swarnkar <<a ymailto="mailto:anu_swar10@yahoo.co.in" href="mailto:anu_swar10@yahoo.co.in">anu_swar10@yahoo.co.in</a>>:<br>><br>> Hi All,<br>><br>> I have seen that there is an APi in cairo for
scaling an image.<br>> But if I the want to resize the cairo surface without actually
scaling the<br>> image how is this possible in cairo. That means if i am resizing the
cairo<br>> surface to bigger size then all the pixels outside the range of the
old<br>> surface-size should be set to zero.<br>><br>> Is this possible in cairo ?<br><br>Only through creating a bigger surface and transferring the data with<br>'cairo_set_source_surface() ; cairo_paint()'.<br><br>The only surface type that seems to have any notion of resize (in<br>cairo API) is xlib, and that is for reacting to outside changes to the<br>native drawable.<br><br>And just to clarify, cairo's scaling works in the same fashion. It<br>scales the source (which may be an image or something else) and<br>paints it to the target. It never changes the source image.<br><br>-- <br>Kalle Vahlman, <a ymailto="mailto:zuh@iki.fi" href="mailto:zuh@iki.fi">zuh@iki.fi</a><br>Powered by <a href="http://movial.fi" target="_blank">http://movial.fi</a><br>Interesting stuff at <a href="http://syslog.movial.fi" target="_blank">http://syslog.movial.fi</a><br></div><br></div></div><br>
<!--4--><hr size=1></hr> 5, 50, 500, 5000 - Store N number of mails in your inbox. <a href="http://in.rd.yahoo.com/tagline_mail_4/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/">Click here.</a></body></html>