Re: Motion picture with gdkpixbuf
- From: "Samuel Cormier-Iijima" <sciyoshi gmail com>
- To: "Kim Jongha" <kim jongha gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Motion picture with gdkpixbuf
- Date: Sun, 8 Oct 2006 16:04:08 -0400
On 10/8/06, Kim Jongha <kim jongha gmail com> wrote:
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();
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);
Does somebody help me?
I'm assuming this is in a key-pressed callback - in that case, you
would have to use gdk_threads_enter ()and gdk_threads_leave() (I
think...). However, a much cleaner solution (instead of the while
loop) would be to add a timeout function that moves the image...
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
] [Thread Prev