nanogui: Newbie ---- Regarding moving picture in window ( As like Scrolling banner on screen)
Subject:
Newbie ---- Regarding moving picture in window ( As like Scrolling banner on screen)
From:
nimesh kanoth ####@####.####
Date:
2 Dec 2005 12:03:27 +0000
Message-Id: <20051202120308.48357.qmail@web32011.mail.mud.yahoo.com>
Hi all,
I need to scroll a picture inside a window.
I am using GrDrawToFit() fuction to draw picture on screen. then I am looping the Y-coordinate to move from one side to other side. But It very slow.. . Is there any other way to move picture .
I atttach my code with this.............. Please help me ....
filename = "/mnt/big.bmp";
image_id = GrLoadImageFromFile(filename,0);
while( 1 )
50 GrDrawImageToFit(w1, gc,i,10,w,h, image_id);
51 i-= speed ;
52 if ( i % width == 0)
53 GrClearWindow(w1,0);
54 if ( i < -w ){
55 GrClearWindow(w1,0);
56 i = 640;
57 }
58 for(q=0;q<9999;q++);
59 }
Here Image is scale and fit to screen. Instead I want to move Image through the window.
And Image width is more than window size.
Please reply me Immediately.
Nimesh
---------------------------------
Yahoo! Shopping
Find Great Deals on Gifts at Yahoo! Shopping