Motion picture with gdkpixbuf
- From: "Kim Jongha" <kim jongha gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Motion picture with gdkpixbuf
- Date: Sun, 8 Oct 2006 18:03:43 +0900
Greeting,
I want to move a picture with gdkpixbuf when I press some key.
It's hard to explain , but when I press some key, I want some image to
move from position 1 to position 2, just like a motion picture .
----- ------
| 2 | | 1 |
----- -------
Anyway I moved the image to position 2, but It's not a motion picture.
As time goes by, The image was just moved from 1 to 2
core part of my code below:
da = gtk_drawing_area_new();
while(i<50)
{
gdk_pixbuf_copy_area(background, 0,0,back_width, back_height, frame, 0,0);
/*of course r1.x value is decrease by 1 */
if(gdk_rectangle_intersect(&r1, &r2, &dest);
{
gdk_pixbuf_composite(....)
}
gtk_widget_queue_draw(da);
g_usleep(50);
}
Does somebody help me?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]