[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Clip Mask Offset Problems
- From: andy ritger <ritger wolfram com>
- To: GTK-App-devel-List <gtk-app-devel-list redhat com>
- Subject: Re: Clip Mask Offset Problems
- Date: Tue, 1 Feb 2000 14:11:15 -0600 (CST)
could you send a code snippet?
I've done something similar before, and after a little fudging it worked
fine.
Each time you draw the image you should be doing something like:
gdk_gc_set_clip_mask (destination_pixmap's gc, xpm's mask)
gdk_gc_set_clip_origin (destination_pixmap's gc, x_offset, y_offset)
gdk_draw_pixmap (destination_pixmap, destination_pixmap's gc,
xpm's pixmap,
x offset into source, y offset into source,
x offset into destination, y offset into destination,
source width, source height);
I've normally allocated a gc specifically for the destination pixmap, but
I don't know why you would have to...
- andy
On Tue, 1 Feb 2000, Arndt Schwaiger wrote:
[ Hi there,
[
[ I am creating a simulator visualization and so I need animated sprites.
[ I dont want to use many different xpm datas for one animation, so I decided
[ to paint only one big animation xpm.
[ My idea was to calculate only one big pixmap and its mask.
[ I am using "gdk_pixmap_create_from_xpm_d" to do this job.
[
[ For displaying the sprites I use "gdk_draw_pixmap".
[ I set the mask clip settings: "gdk_gc_set_clip_mask"
[ And the "gdk_gc_set_clip_origin".
[
[ For the different animation steps I want to use an x-offset and an y-offset
[ by using the "gdk_draw_pixmap".This works...BUT NOW THE PROBLEM:
[ It seems that this offset works only with the pixmap and NOT with its mask !!
[ That means that all animation steps will be masked with the same mask !!
[ The offset is only added to the pixmap and not to the mask.
[ Is it possible that this is a bug ??
[ What can I do ??
[
[ greetings
[ Arndt Schwaiger
[
[
[ --
[ To unsubscribe: mail gtk-app-devel-list-request@redhat.com with
[ "unsubscribe" as the Subject.
[
[ Mailing list concerns should be mailed to <listmaster@redhat.com>
[
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]